mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Ensure Catch2ConfigVersion.cmake is installed properly
The old version would lead to error when Catch was installed as a subproject. The file would be written to the subproject's build directory and then would not be installed properly.
This commit is contained in:
parent
dc8a8e6371
commit
d38f782995
@ -445,9 +445,10 @@ install(EXPORT Catch2Config
|
||||
# install Catch2ConfigVersion.cmake file to handle versions in find_package
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
write_basic_package_version_file(Catch2ConfigVersion.cmake
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_BINARY_DIR}/Catch2ConfigVersion.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
|
||||
DESTINATION ${CATCH_CMAKE_CONFIG_DESTINATION})
|
||||
|
Loading…
Reference in New Issue
Block a user