1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 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")
- # set(CMAKE_C_COMPILER /usr/bin/gcc)
- # set(CMAKE_CXX_COMPILER /usr/bin/g++)
- # set(CUDA_INSTALL_TARGET_DIR targets/aarch64-linux)
- # set(CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda)
- # set(CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_ROOT_DIR}/${CUDA_INSTALL_TARGET_DIR}/include)
- # set(CUDA_TOOLKIT_ROOT_DIR /usr/local/cuda-11.4)
- # set(CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_ROOT_DIR}/include)
- # set(CUDA_LIBRARIES ${CUDA_TOOLKIT_ROOT_DIR}/lib64)
- # 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()
-
- set(CUDA_LIB_DIRS ${CUDA_TOOLKIT_ROOT_DIR}/${CUDA_INSTALL_TARGET_DIR}/lib)
- # add_library(cuda_kernels STATIC yuyvtoi420.cu)
- # cuda_add_library(cuda_kernels yuyvtoi420.cu)
-
- 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(${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 )
- # FILE(GLOB CUDA_SOURCE *.cu)
- # message(STATUS "CUDA source files:")
- # foreach(file ${CUDA_SOURCE})
- # message(STATUS " ${file}")
- # endforeach()
- # FILE(GLOB LIVEHELPERSOURCE src/*.cpp *.cpp )
-
- # add_library(webrtcinterop ${LIVEHELPERSOURCE} /home/nvidia/Desktop/env_enc/jetson_multimedia_api/samples/common/classes/NvBufSurface.cpp)
- add_library(webrtcinterop ${LIVEHELPERSOURCE} )
- target_compile_definitions(webrtcinterop PUBLIC NO_OPENSSL=1 BSD=1 SOCKLEN_T=socklen_t _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1)
- # target_link_libraries(webrtcinterop ${OpenCV_LIBS})
- # target_link_libraries(webrtcinterop libmvgmslcamera.so)
- # target_link_libraries(webrtcinterop cuda_kernels ${CUDA_LIBRARIES})
- # target_link_libraries(webrtcinterop libcuda_kernels.a ${CUDA_LIBRARIES})
- set(CPACK_PROJECT_NAME ${PROJECT_NAME})
- set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
- include(CPack)
|