Skip to content
Snippets Groups Projects
Commit 173bb9ae authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

added missing <PROJECT_NAME>ConfigVersion.cmake in create_cmake_config_files macro

parent 34a054b5
No related branches found
No related tags found
No related merge requests found
#######################################################################################################################
#
# cmake module for finding @PROJECT_NAME@
#
# returns:
# PACKAGE_VERSION = full provided version string
# PACKAGE_VERSION_EXACT = true if version is exact match
# PACKAGE_VERSION_COMPATIBLE = true if version is compatible
#
#######################################################################################################################
#######################################################################################################################
#
# IMPORTANT NOTE:
#
# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from
# there. Make sure to keep the file generic, since it will be used by other projects, too.
#
# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes
# into the project-template repository immediately.
#
#######################################################################################################################
set(PACKAGE_VERSION @@PROJECT_NAME@_SOVERSION@)
if(@@PROJECT_NAME@_SOVERSION@ VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_COMPATIBLE 1)
set(PACKAGE_VERSION_EXACT 1)
elseif(@@PROJECT_NAME@_SOVERSION@ VERSION_GREATER "${PACKAGE_FIND_VERSION}")
set(PACKAGE_VERSION_COMPATIBLE 1)
endif()
......@@ -56,6 +56,8 @@ endforeach()
# create the cmake find_package configuration file
configure_file(cmake/PROJECT_NAMEConfig.cmake.in.in "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake.in" @ONLY)
configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake.in "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" @ONLY)
configure_file(cmake/PROJECT_NAMEConfigVersion.cmake.in.in "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake.in" @ONLY)
configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" @ONLY)
# create the shell script for standard make files
configure_file(cmake/PROJECT_NAME-config.in.in "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.in" @ONLY)
......@@ -64,6 +66,8 @@ configure_file(${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}-config.in "${PROJECT_
# install cmake find_package configuration file
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
DESTINATION lib/cmake/${PROJECT_NAME} COMPONENT dev)
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION lib/cmake/${PROJECT_NAME} COMPONENT dev)
# install same cmake configuration file another time into the Modules cmake subdirectory for compatibility reasons
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment