123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- cmake_minimum_required(VERSION 3.0.0)
- project(webrtcinterop VERSION 0.1.0)
- MESSAGE(STATUS "operation system is ${CMAKE_HOST_SYSTEM_PROCESSOR}")
- SET (CMAKE_CXX_COMPILER "/usr/bin/clang++-12")
- find_package(CUDA REQUIRED)
- enable_language(CUDA)
-
- if( CMAKE_BUILD_TYPE STREQUAL "Debug" )
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g2 -ggdb -Wall -Wno-unused-variable -pthread")
- endif()
- add_definitions(-DWEBRTC_POSIX)
- add_definitions(-DWEBRTC_LINUX)
- add_definitions(-DJSONCPP_USING_SECURE_MEMORY=0)
- set(API_DIR ./include)
-
- set(WEBRTC_DIR ../thirdparty/webrtc)
- include_directories(${CUDA_INCLUDES} ./ ./include ./include/libjpeg-8b /usr/include/libdrm)
- include_directories(${API_DIR})
- include_directories(${WEBRTC_DIR}/include)
- include_directories(${WEBRTC_DIR}/include/third_party/abseil-cpp)
- include_directories(${WEBRTC_DIR}/include/third_party/libyuv/include)
- include_directories(${WEBRTC_DIR}/include/third_party/jsoncpp/source/include)
- include_directories(${WEBRTC_DIR}/include/third_party/jsoncpp/generated)
- include_directories(${CUDA_INCLUDE_DIRS} )
- FILE(GLOB LIVEHELPERSOURCE src/*.cpp *.cpp )
- aux_source_directory(/usr/src/jetson_multimedia_api/samples/common/classes COMMON)
-
- add_library(webrtcinterop ${LIVEHELPERSOURCE} ${COMMON})
- target_compile_definitions(webrtcinterop PUBLIC NO_OPENSSL=1 BSD=1 SOCKLEN_T=socklen_t _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1)
- link_directories(/usr/lib/aarch64-linux-gnu/tegra /lib/aarch64-linux-gnu /usr/local/lib /usr/lib)
- target_link_libraries(webrtcinterop ${CUDA_LIBRARIES} pthread v4l2 EGL GLESv2 X11 nvbufsurface nvbufsurftransform nvjpeg nvosd drm cuda)
- set(CPACK_PROJECT_NAME ${PROJECT_NAME})
- set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
- include(CPack)
|