From 089ef64aa3d8d9fe326cd4f5d4ef85186afc04a8 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 10 Jun 2022 15:25:02 +0200 Subject: [PATCH 1/4] Declare version in cmake project() call CMakeLists.txt: Declare the project's version in the cmake project() call so that it may be exported to the project's cmake integration (used by other projects). --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7886167..ff712e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) From 4c33b91fe98d5383c391b5ac2a1b2c990519dd6c Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 10 Jun 2022 15:44:04 +0200 Subject: [PATCH 2/4] Write ghc_filesystem-config-version.cmake file CMakeLists.txt: Write a ghc_filesystem-config-version.cmake file and install it, so that other projects may rely on the exact version of ghc_filesystem. The compatibility mode implies, that any version of ghc_filesystem with the same major version is feature compatible. --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff712e1..8995f26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,7 +73,16 @@ if(GHC_FILESYSTEM_WITH_INSTALL) "${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() From f3c1058928991927cf85dc1a286c328f6a98beca Mon Sep 17 00:00:00 2001 From: gulrak Date: Fri, 3 Mar 2023 06:53:13 +0100 Subject: [PATCH 3/4] Update CMakeLists.txt The projects compatibility rule is that minor changes can be api changes, so I changed it to SameMinorVersion. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8995f26..342199b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ if(GHC_FILESYSTEM_WITH_INSTALL) write_basic_package_version_file( "${PROJECT_BINARY_DIR}/cmake/ghc_filesystem-config-version.cmake" VERSION ${PROJECT_VERSION} - COMPATIBILITY SameMajorVersion + COMPATIBILITY SameMinorVersion ) install( FILES From b1ff2ce95ec606653fb2c1bc45dda11fb62e818c Mon Sep 17 00:00:00 2001 From: gulrak Date: Fri, 3 Mar 2023 17:48:35 +0100 Subject: [PATCH 4/4] Changed version to in-between releases version 1.5.13 As the master version is on that number it avoids confusion. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 342199b..7529614 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.7.2) project( ghcfilesystem, - VERSION 1.5.12 + VERSION 1.5.13 ) if (POLICY CMP0077)