Skip to content

Commit

Permalink
Merge pull request #149 from dvzrv/declare_version
Browse files Browse the repository at this point in the history
Declare and export version from CMake
  • Loading branch information
gulrak authored Mar 3, 2023
2 parents 3afbd9c + b1ff2ce commit e6b34e2
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.7.2)
project(ghcfilesystem)
project(
ghcfilesystem,
VERSION 1.5.13
)

if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
Expand Down Expand Up @@ -70,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 SameMinorVersion
)
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()

0 comments on commit e6b34e2

Please sign in to comment.