2018-02-24 15:00:39 +08:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2018-08-03 15:17:36 +08:00
|
|
|
project(live555 C CXX)
|
2018-02-24 15:00:39 +08:00
|
|
|
|
|
|
|
include_directories(
|
|
|
|
BasicUsageEnvironment/include
|
|
|
|
groupsock/include
|
|
|
|
liveMedia/include
|
|
|
|
UsageEnvironment/include
|
|
|
|
)
|
|
|
|
|
2018-10-09 15:44:45 +08:00
|
|
|
if (NOT MSVC)
|
|
|
|
add_compile_options(-DSOCKLEN_T=socklen_t)
|
|
|
|
endif()
|
|
|
|
|
2018-08-03 15:17:36 +08:00
|
|
|
file(GLOB BASIC_USAGE_ENVIRONMENT_SRCS BasicUsageEnvironment/*.c BasicUsageEnvironment/*.cpp)
|
2018-02-24 15:00:39 +08:00
|
|
|
add_library(BasicUsageEnvironment ${BASIC_USAGE_ENVIRONMENT_SRCS})
|
|
|
|
|
2018-08-03 15:17:36 +08:00
|
|
|
file(GLOB GROUPSOCK_SRCS groupsock/*.c groupsock/*.cpp)
|
2018-02-24 15:00:39 +08:00
|
|
|
add_library(groupsock ${GROUPSOCK_SRCS})
|
|
|
|
|
2018-08-03 15:17:36 +08:00
|
|
|
file(GLOB LIVEMEDIA_SRCS liveMedia/*.c liveMedia/*.cpp)
|
2018-02-24 15:00:39 +08:00
|
|
|
add_library(liveMedia ${LIVEMEDIA_SRCS})
|
2019-12-21 04:00:56 +08:00
|
|
|
find_package(OpenSSL REQUIRED)
|
|
|
|
target_include_directories(liveMedia PRIVATE "${OPENSSL_INCLUDE_DIR}")
|
2018-02-24 15:00:39 +08:00
|
|
|
|
2018-08-03 15:17:36 +08:00
|
|
|
file(GLOB USAGE_ENVIRONMENT_SRCS UsageEnvironment/*.c UsageEnvironment/*.cpp)
|
|
|
|
add_library(UsageEnvironment ${USAGE_ENVIRONMENT_SRCS})
|
2018-02-24 15:00:39 +08:00
|
|
|
|
|
|
|
install(TARGETS groupsock BasicUsageEnvironment liveMedia UsageEnvironment
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
)
|