summaryrefslogtreecommitdiff
path: root/libraries/ghc_filesystem/cmake_project_version.patch
blob: 7ff8fe83922a182e5622044ed2765995a6dd280f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- 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()