set_target_properties version

This commit is contained in:
mutouyun 2021-08-15 13:55:11 +08:00
parent 36717e6336
commit 8bc418ebc7
3 changed files with 13 additions and 7 deletions

View File

@ -8,6 +8,10 @@
# ctest. You can select which tests to run using 'ctest -R regex'.
# For more options, run 'ctest --help'.
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif (POLICY CMP0077)
# When other libraries are using a shared version of runtime libraries,
# Google Test also has to use one.
option(
@ -59,10 +63,6 @@ if (POLICY CMP0063) # Visibility
cmake_policy(SET CMP0063 NEW)
endif (POLICY CMP0063)
if (POLICY CMP0077) # Visibility
cmake_policy(SET CMP0077 NEW)
endif (POLICY CMP0077)
if (COMMAND set_up_hermetic_build)
set_up_hermetic_build()
endif()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.10)
project(cpp-ipc)
option(LIBIPC_BUILD_TESTS "Build all of libipc's own tests." OFF)

View File

@ -1,4 +1,4 @@
project(ipc VERSION 1.0.0 LANGUAGES CXX)
project(ipc)
if(UNIX)
file(GLOB SRC_FILES ${LIBIPC_PROJECT_DIR}/src/libipc/platform/*_linux.cpp)
@ -34,6 +34,12 @@ set_target_properties(${PROJECT_NAME}
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" )
# set version
set_target_properties(${PROJECT_NAME}
PROPERTIES
VERSION 1.0.0
SOVERSION 1)
target_include_directories(${PROJECT_NAME}
PUBLIC ${LIBIPC_PROJECT_DIR}/include
PRIVATE ${LIBIPC_PROJECT_DIR}/src