CMakeLists.txt 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. cmake_minimum_required(VERSION 3.0.0)
  2. project(webrtcinterop VERSION 0.1.0)
  3. MESSAGE(STATUS "operation system is ${CMAKE_HOST_SYSTEM_PROCESSOR}")
  4. IF(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")#
  5. SET (CMAKE_C_COMPILER "/usr/bin/clang")
  6. SET (CMAKE_CXX_COMPILER "/usr/bin/clang++")
  7. SET (CMAKE_AR "/usr/bin/llvm-ar")
  8. SET (CMAKE_LINKER "/usr/bin/llvm-ld")
  9. SET (CMAKE_NM "/usr/bin/llvm-nm")
  10. SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump")
  11. ENDIF()
  12. if( CMAKE_BUILD_TYPE STREQUAL "Debug" )
  13. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g2 -ggdb -Wall -Wno-unused-variable -pthread")
  14. endif()
  15. #find_package(CUDA REQUIRED)
  16. add_definitions(-DWEBRTC_POSIX)
  17. add_definitions(-DWEBRTC_LINUX)
  18. add_definitions(-DJSONCPP_USING_SECURE_MEMORY=0)
  19. set(API_DIR ./include)
  20. set(WEBRTC_DIR ../thirdparty/webrtc)
  21. include_directories(${API_DIR})
  22. include_directories(${WEBRTC_DIR}/include)
  23. include_directories(${WEBRTC_DIR}/include/third_party/abseil-cpp)
  24. include_directories(${WEBRTC_DIR}/include/third_party/libyuv/include)
  25. include_directories(${WEBRTC_DIR}/include/third_party/jsoncpp/source/include)
  26. include_directories(${WEBRTC_DIR}/include/third_party/jsoncpp/generated)
  27. #if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
  28. #add_definitions(-DWEBRTC_AARCH)
  29. #include_directories(${WEBRTC_DIR}/include/aarch64)
  30. #nclude_directories(${WEBRTC_DIR}/include/aarch64/third_party/abseil-cpp)
  31. #include_directories(${WEBRTC_DIR}/include/aarch64/third_party/libyuv/include)
  32. #include_directories(${WEBRTC_DIR}/include/aarch64/third_party/jsoncpp/source/include)
  33. #include_directories(${WEBRTC_DIR}/include/aarch64/third_party/jsoncpp/generated)
  34. #endif()
  35. #include_directories(${CUDA_INCLUDE_DIRS}
  36. # ${ZED_INCLUDE_DIRS}
  37. # )
  38. #set(LIVE ${CMAKE_BINARY_DIR}/../live)
  39. #message(${LIVE})
  40. FILE(GLOB LIVEHELPERSOURCE src/*.cpp *.cpp)
  41. add_library(webrtcinterop ${LIVEHELPERSOURCE})
  42. #target_include_directories(webrtcinterop PUBLIC ${LIVE}/groupsock/include ${LIVE}/liveMedia/include ${LIVE}/UsageEnvironment/include ${LIVE}/BasicUsageEnvironment/include inc)
  43. target_compile_definitions(webrtcinterop PUBLIC NO_OPENSSL=1 BSD=1 SOCKLEN_T=socklen_t _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1)
  44. set(CPACK_PROJECT_NAME ${PROJECT_NAME})
  45. set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
  46. include(CPack)