cmake_minimum_required(VERSION 3.7) set(PROJECT_NAME project) project(${PROJECT_NAME}) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED True) add_definitions(-DLIVEMEDIA_API=) add_definitions(-DNO_OPENSSL=1) # target_compile_definitions(${PROJECT_NAME} INTERFACE LIVEMEDIA_API=) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/live555/groupsock) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/live555/UsageEnvironment) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/live555/BasicUsageEnvironment) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/live555/liveMedia) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/live555/EpollTaskScheduler) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/rtcp) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/rtcp/rtc) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann/detail) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/includes/nlohmann/thirdparty) set(LIBS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libs) # static # for live555 link_directories(${LIBS_PATH}) link_libraries(UsageEnvironment) link_libraries(BasicUsageEnvironment) link_libraries(groupsock) link_libraries(liveMedia) link_libraries(EpollTaskScheduler) # sender of RTCP link_libraries(datachannel) link_libraries(json) aux_source_directory(./src DIR_SRCS) add_executable(${PROJECT_NAME} ${DIR_SRCS}) # shared # for sender find_package(Threads REQUIRED) target_link_libraries(${PROJECT_NAME} Threads::Threads) # target_link_libraries(${PROJECT_NAME} datachannel) target_link_libraries(${PROJECT_NAME} ws2_32) file(COPY ${CMAKE_SOURCE_DIR}/libs/datachannel.dll DESTINATION ${CMAKE_BINARY_DIR}) file(COPY ${CMAKE_SOURCE_DIR}/rtsp.json DESTINATION ${CMAKE_BINARY_DIR})