diff --git a/CMakeLists.txt b/CMakeLists.txt index be0ede666..171d946a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 #######################################################################