Skip to content

Commit

Permalink
Match config and version files
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Sep 10, 2021
1 parent 6d371d2 commit 0dc8154
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,23 @@ if (SMALL_BUILD_INSTALLER)
message(STATUS "${CMAKE_PROJECT_NAME} install directory: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "${CMAKE_PROJECT_NAME} library install directory: ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")

# Create smallConfigVersion.cmake and install it
# Create small-config-version.cmake and install it
if (CMAKE_PROJECT_VERSION VERSION_LESS 1.0.0)
set(compatibility_mode SameMajorVersion)
else()
set(compatibility_mode SameMinorVersion)
endif()
write_basic_package_version_file(
smallConfigVersion.cmake
small-config-version.cmake
VERSION ${PACKAGE_VERSION}
COMPATIBILITY ${compatibility_mode}
)

# Install the file smallConfigVersion.cmake
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/smallConfigVersion.cmake
# Install the file small-config-version.cmake
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/small-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/small)

# Create smallConfig.cmake from smallConfig.cmake.in
# Create small-config.cmake from small-config.cmake.in
configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/small-config.cmake.in # input file
${CMAKE_CURRENT_BINARY_DIR}/small-config.cmake # output file
Expand Down

0 comments on commit 0dc8154

Please sign in to comment.