slackbuilds/libraries/ghc_filesystem/cmake_project_version.patch

32 lines
1.2 KiB
Diff

--- a/CMakeLists.txt 2022-06-26 22:21:15.977039733 +0200
+++ b/CMakeLists.txt 2022-06-26 22:20:35.782042699 +0200
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.7.2)
-project(ghcfilesystem)
+project(
+ ghcfilesystem,
+ VERSION 1.5.12
+)
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
@@ -70,7 +73,16 @@
"${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem"
PATH_VARS CMAKE_INSTALL_INCLUDEDIR)
- install(FILES "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem")
+ write_basic_package_version_file(
+ "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config-version.cmake"
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY SameMajorVersion
+ )
+ install(
+ FILES
+ "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config.cmake"
+ "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config-version.cmake"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ghc_filesystem"
+ )
add_library(ghcFilesystem::ghc_filesystem ALIAS ghc_filesystem)
endif()