3
0
mirror of https://github.com/triqs/dft_tools synced 2024-08-16 01:08:29 +02:00

[cmake] Set VERSION property for project library using major and minor version numbers

This commit is contained in:
Nils Wentzell 2020-10-30 14:39:40 -04:00
parent 547a7e3211
commit 32df9c4c5f

View File

@ -6,7 +6,10 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME}_c ALIAS ${PROJECT_NAME}_c)
target_link_libraries(${PROJECT_NAME}_c PUBLIC triqs PRIVATE $<BUILD_INTERFACE:${PROJECT_NAME}_warnings>)
# Configure target and compilation
set_property(TARGET ${PROJECT_NAME}_c PROPERTY POSITION_INDEPENDENT_CODE ON)
set_target_properties(${PROJECT_NAME}_c PROPERTIES
POSITION_INDEPENDENT_CODE ON
VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
)
target_include_directories(${PROJECT_NAME}_c PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/c++>)
target_include_directories(${PROJECT_NAME}_c SYSTEM INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>)
target_compile_definitions(${PROJECT_NAME}_c PUBLIC