From 63c54fe7c8eda4652ef81ab9a759e181ac48c5ee Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 3 Dec 2023 17:16:11 +0100 Subject: [PATCH] CMake: Remove UseFLTK.cmake generation and usage --- .gitignore | 4 +--- CMake/FLTKConfig.cmake.in | 7 +------ CMake/UseFLTK.cmake.in | 15 --------------- CMake/export.cmake | 7 ------- CMake/install.cmake | 13 +------------ README.CMake.txt | 6 +++--- 6 files changed, 6 insertions(+), 46 deletions(-) delete mode 100644 CMake/UseFLTK.cmake.in diff --git a/.gitignore b/.gitignore index e0ffb8b6f..800280fd6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,15 +9,13 @@ *.o **/.DS_Store -# CMake build artifacts if built in source - not recommended, but anyway +# CMake build artifacts if built in source - strongly discouraged! bin/ **/cmake_install.cmake **/CMakeCache.txt **/CMakeFiles/ -etc/UseFLTK.cmake cmake_uninstall.cmake -UseFLTK.cmake FLTK.sln FLTK-Targets.cmake FLTKConfig.cmake diff --git a/CMake/FLTKConfig.cmake.in b/CMake/FLTKConfig.cmake.in index fb722c124..e647e6453 100644 --- a/CMake/FLTKConfig.cmake.in +++ b/CMake/FLTKConfig.cmake.in @@ -2,7 +2,7 @@ # FLTKConfig.cmake - FLTK CMake configuration file for external projects. # # This file is generated by CMake and used to load FLTK's settings for -# an external project. +# an external project, i.e. a project using FLTK. # # It defines the following variables: # @@ -17,10 +17,6 @@ # # FLTK_INCLUDE_DIR - FLTK include directories (same as FLTK_INCLUDE_DIRS) # -# FLTK_USE_FILE - previously used to set things up to use FLTK -# - deprecated since FLTK 1.3.4 -# - will be removed in FLTK 1.4.0 or later -# # Important note: FLTK's CMake build files are not yet complete and may be # changed in future versions. This includes the list of defined variables # above that may be changed if necessary. @@ -31,7 +27,6 @@ set (FLTK_VERSION @FLTK_VERSION@) include (${CMAKE_CURRENT_LIST_DIR}/FLTK-Targets.cmake) set (FLTK_INCLUDE_DIRS "@INCLUDE_DIRS@") -set (FLTK_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/UseFLTK.cmake) # for compatibility with CMake's FindFLTK.cmake diff --git a/CMake/UseFLTK.cmake.in b/CMake/UseFLTK.cmake.in deleted file mode 100644 index f9e9e0b6e..000000000 --- a/CMake/UseFLTK.cmake.in +++ /dev/null @@ -1,15 +0,0 @@ -# -# UseFLTK.CMake - FLTK CMake environment configuration file for external projects. -# -# This file is deprecated and will be removed in FLTK 1.4.0 or later -# -# automatically generated - do not edit -# - -include_directories("@FLTK_INCLUDE_DIRS@") - -message(AUTHOR_WARNING -" * Warning: UseFLTK.cmake is deprecated and will be removed in FLTK 1.4.0 - * or later. Please use 'include_directories(\${FLTK_INCLUDE_DIRS})' or - * 'target_include_directories( PUBLIC|PRIVATE \${FLTK_INCLUDE_DIRS})' - * instead of 'include(\${FLTK_USE_FILE})'.") diff --git a/CMake/export.cmake b/CMake/export.cmake index 828d4370d..63502a4d9 100644 --- a/CMake/export.cmake +++ b/CMake/export.cmake @@ -64,13 +64,6 @@ configure_file( @ONLY ) -# generate UseFLTK.cmake for build directory use -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/UseFLTK.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/UseFLTK.cmake - @ONLY -) - # generate fltk-config for build directory use set (prefix ${CMAKE_CURRENT_BINARY_DIR}) set (exec_prefix "\${prefix}") diff --git a/CMake/install.cmake b/CMake/install.cmake index 729cc5b65..ea36ab301 100644 --- a/CMake/install.cmake +++ b/CMake/install.cmake @@ -77,19 +77,8 @@ install (FILES DESTINATION ${FLTK_CONFIG_PATH} ) -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/CMake/UseFLTK.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/etc/UseFLTK.cmake - @ONLY -) +# Generate fltk-config -# Deprecated: install UseFLTK.cmake with deprecation warnings only -install (FILES - ${CMAKE_CURRENT_BINARY_DIR}/etc/UseFLTK.cmake - DESTINATION ${FLTK_CONFIG_PATH} -) - -# generate fltk-config set (prefix ${CMAKE_INSTALL_PREFIX}) set (exec_prefix "\${prefix}") set (includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/README.CMake.txt b/README.CMake.txt index c80832136..c1a40e691 100644 --- a/README.CMake.txt +++ b/README.CMake.txt @@ -608,8 +608,8 @@ The target_link_libraries() command is used to specify all necessary FLTK libraries. Thus, you may have to add fltk_images, fltk_gl, etc… Note: the variable FLTK_USE_FILE used to include another file in -previous FLTK versions was deprecated since FLTK 1.3.4 and will be -removed in FLTK 1.4.0 (this version) or later (maybe 1.4.1 or 1.4.2). +previous FLTK versions was deprecated since FLTK 1.3.4 and has been +removed in FLTK 1.4.0. 3.3 Building a Program Using Fluid Files @@ -714,7 +714,7 @@ May 15 2013 - erco: small formatting tweaks, added some examples Feb 23 2014 - msurette: updated to reflect changes to the CMake files Apr 07 2015 - AlbrechtS: update use example and more docs Jan 31 2016 - msurette: custom command instead of fltk_wrap_ui -Nov 01 2016 - AlbrechtS: remove deprecated FLTK_USE_FILE, add MinGW build +Nov 01 2016 - AlbrechtS: add MinGW build Jul 05 2017 - matt: added instructions for macOS and Xcode Dec 29 2018 - AlbrechtS: add documentation option descriptions Apr 29 2021 - AlbrechtS: document macOS "universal apps" build setup