mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-04 11:13:58 +08:00
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.
This commit is contained in:
parent
089ef64aa3
commit
4c33b91fe9
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user