diff --git a/CMakeLists.txt b/CMakeLists.txt index b32b69f..a5810d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.5) project(coturn) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) +# TODO: Modify this when the version is released SET(BUILD_VERSION "4.5.2") # Find Git Version Patch @@ -60,6 +61,18 @@ include(CheckIncludeFile) include(CheckIncludeFileCXX) include(CheckFunctionExists) +# Create install runtime target +add_custom_target(install-runtime + COMMAND + "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=Runtime + -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake" +) +# Create uninstall runtime target +add_custom_target(uninstall-runtime + COMMAND + "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=Runtime + -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" +) # Create will be delete files CONFIGURE_FILE( "${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in" diff --git a/src/apps/common/CMakeLists.txt b/src/apps/common/CMakeLists.txt index d66953c..520d09d 100644 --- a/src/apps/common/CMakeLists.txt +++ b/src/apps/common/CMakeLists.txt @@ -62,7 +62,9 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + COMPONENT Runtime ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} diff --git a/src/apps/natdiscovery/CMakeLists.txt b/src/apps/natdiscovery/CMakeLists.txt index 0935b63..c7df4d1 100644 --- a/src/apps/natdiscovery/CMakeLists.txt +++ b/src/apps/natdiscovery/CMakeLists.txt @@ -10,4 +10,5 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PRIVATE turnclient) INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime ) diff --git a/src/apps/oauth/CMakeLists.txt b/src/apps/oauth/CMakeLists.txt index 3f14067..18ce938 100644 --- a/src/apps/oauth/CMakeLists.txt +++ b/src/apps/oauth/CMakeLists.txt @@ -10,4 +10,5 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PRIVATE turnclient) INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime ) diff --git a/src/apps/peer/CMakeLists.txt b/src/apps/peer/CMakeLists.txt index f920e7b..3ff8057 100644 --- a/src/apps/peer/CMakeLists.txt +++ b/src/apps/peer/CMakeLists.txt @@ -10,4 +10,5 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PRIVATE turnclient) INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime ) diff --git a/src/apps/relay/CMakeLists.txt b/src/apps/relay/CMakeLists.txt index 2f1a57d..6b801e7 100644 --- a/src/apps/relay/CMakeLists.txt +++ b/src/apps/relay/CMakeLists.txt @@ -96,4 +96,5 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE ${turnserver_DEFINED}) INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime ) diff --git a/src/apps/rfc5769/CMakeLists.txt b/src/apps/rfc5769/CMakeLists.txt index 9c42828..492e194 100644 --- a/src/apps/rfc5769/CMakeLists.txt +++ b/src/apps/rfc5769/CMakeLists.txt @@ -10,4 +10,5 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PRIVATE turnclient) INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime ) diff --git a/src/apps/stunclient/CMakeLists.txt b/src/apps/stunclient/CMakeLists.txt index ddb41e6..3e64b3b 100644 --- a/src/apps/stunclient/CMakeLists.txt +++ b/src/apps/stunclient/CMakeLists.txt @@ -10,4 +10,5 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PRIVATE turnclient) INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime ) diff --git a/src/apps/uclient/CMakeLists.txt b/src/apps/uclient/CMakeLists.txt index 47422c0..86e6eef 100644 --- a/src/apps/uclient/CMakeLists.txt +++ b/src/apps/uclient/CMakeLists.txt @@ -12,4 +12,5 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES}) target_link_libraries(${PROJECT_NAME} PRIVATE turnclient) INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime ) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 818f8db..3bcc644 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -33,7 +33,9 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + COMPONENT Runtime ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/turn/client INCLUDES DESTINATION diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index fcc21ee..8c2261f 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -36,7 +36,9 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + COMPONENT Runtime ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}