CMakeLists.txt 2.4 KB

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