Skip to content

Commit a3399cc

Browse files
committed
add version and soversion
1 parent c4fec6f commit a3399cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
109109
# generate the version file for the config file
110110
write_basic_package_version_file(
111111
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
112-
VERSION "${${PROJECT_NAME}_VERSION_MAJOR}.${${PROJECT_NAME}_VERSION_MINOR}.${${PROJECT_NAME}_VERSION_PATCH}"
113-
COMPATIBILITY AnyNewerVersion
112+
VERSION "${PROJECT_VERSION}"
113+
COMPATIBILITY SameMajorVersion
114114
)
115115

116116
# install the configuration file

myframe/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ target_include_directories(${PROJECT_NAME}
1313
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
1414
$<INSTALL_INTERFACE:include>
1515
)
16+
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
17+
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
1618

1719
# export file
1820
include (GenerateExportHeader)

0 commit comments

Comments
 (0)