CMake: add FLTKConfigVersion.cmake

This file enables consumers to search for a particular FLTK version.
This commit is contained in:
Albrecht Schlosser 2024-08-09 18:23:22 +02:00
parent b7fc02e523
commit fe7560fe61
1 changed files with 16 additions and 0 deletions

View File

@ -177,6 +177,22 @@ if(FLTK_BUILD_EXAMPLES)
add_subdirectory(examples)
endif(FLTK_BUILD_EXAMPLES)
#######################################################################
# Create and install version config file 'FLTKConfigVersion.cmake'
#######################################################################
include(CMakePackageConfigHelpers)
write_basic_package_version_file(FLTKConfigVersion.cmake
# [VERSION requiredVersion] # defaults to project version
COMPATIBILITY SameMinorVersion
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/FLTKConfigVersion.cmake
DESTINATION ${FLTK_CONFIG_PATH}
)
#######################################################################
# installation
#######################################################################