CMake: add version to install files (#2)

This commit is contained in:
Yaroslav 2024-04-30 00:02:06 +05:00 committed by GitHub
parent abbade08f1
commit 672a965162
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,8 +49,17 @@ configure_package_config_file(
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/hyprwayland-scanner"
PATH_VARS CMAKE_INSTALL_BINDIR
)
write_basic_package_version_file(
"hyprwayland-scanner-config-version.cmake"
VERSION "${VERSION}"
COMPATIBILITY AnyNewerVersion
)
# Installation
install(TARGETS hyprwayland-scanner)
install(FILES ${CMAKE_BINARY_DIR}/hyprwayland-scanner.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(FILES ${CMAKE_BINARY_DIR}/hyprwayland-scanner-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hyprwayland-scanner)
install(FILES
${CMAKE_BINARY_DIR}/hyprwayland-scanner-config.cmake
${CMAKE_BINARY_DIR}/hyprwayland-scanner-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hyprwayland-scanner
)