diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-02-07 18:30:11 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-02-07 18:37:34 +0100 |
| commit | fd5cd809356dc73d2ede5bb2f0db25098771cb8e (patch) | |
| tree | 70c82946eb7d11eba910bb387dc3bcc20abfd42c /CMake/cmake_uninstall.cmake.in | |
| parent | 1cf6fdfa8562fafa0566e1008f74ea94f71356e4 (diff) | |
Introduce "Modern CMake" in FLTK
This is a big commit and there are too many changes to list them all.
The main changes are:
- rename all CMake build options to 'FLTK_*'
- export library targets with namespace (prefix) 'fltk::'
- standardize shared library target names with suffix '-shared'
- set public build properties on libraries for consumers
- document library names and aliases in README.CMake.txt
- document changes in "Migrating Code from FLTK 1.3 to 1.4"
- partial backwards compatibility for old user projects
Included but not directly related changes:
- fix Windows (Visual Studio) DLL build
- add CMake function fl_debug_target() to show target properties
- don't build test programs if FLTK is a subproject
- internal: reformat CMake code: remove space before '('
Thanks to Matthias and Manolo for their help, testing, and feeback.
Diffstat (limited to 'CMake/cmake_uninstall.cmake.in')
| -rw-r--r-- | CMake/cmake_uninstall.cmake.in | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/CMake/cmake_uninstall.cmake.in b/CMake/cmake_uninstall.cmake.in index b2547ecf2..efd90e47f 100644 --- a/CMake/cmake_uninstall.cmake.in +++ b/CMake/cmake_uninstall.cmake.in @@ -1,8 +1,9 @@ # # Support file to uninstall the FLTK project using CMake +# # Originally written by Michael Surette # -# Copyright 1998-2023 by Bill Spitzak and others. +# Copyright 1998-2024 by Bill Spitzak and others. # # This library is free software. Distribution and use rights are outlined in # the file "COPYING" which should have been included with this file. If this @@ -15,13 +16,13 @@ # https://www.fltk.org/bugs.php # -if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") -endif () +endif() -file (READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) -string (REGEX REPLACE "\n" ";" files "${files}") +file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +string(REGEX REPLACE "\n" ";" files "${files}") # Note 1: 'cmake -E remove [-f]' is deprecated since CMake 3.17 and the docs # state: "The implementation was buggy and always returned 0. It cannot be @@ -30,13 +31,13 @@ string (REGEX REPLACE "\n" ";" files "${files}") # Note 3: # Remove this distinction if: cmake_minimum_required(VERSION 3.17) or higher. -if (CMAKE_VERSION VERSION_LESS 3.17) - set (rm_cmd remove) -else () - set (rm_cmd rm) -endif () +if(CMAKE_VERSION VERSION_LESS 3.17) + set(rm_cmd remove) +else() + set(rm_cmd rm) +endif() -foreach (file ${files}) +foreach(file ${files}) message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") execute_process( COMMAND "${CMAKE_COMMAND}" -E ${rm_cmd} -f "$ENV{DESTDIR}${file}" @@ -45,12 +46,12 @@ foreach (file ${files}) RESULT_VARIABLE rm_retval ) - if (NOT "${rm_retval}" STREQUAL 0) - message (STATUS "Error removing \"$ENV{DESTDIR}${file}\"") - message (STATUS " Status = '${rm_retval}'") - message (STATUS " Output = '${rm_out}'") - message (STATUS " Error = '${rm_err}'") - message (FATAL_ERROR "Exiting with fatal error.") - endif () + if(NOT "${rm_retval}" STREQUAL 0) + message(STATUS "Error removing \"$ENV{DESTDIR}${file}\"") + message(STATUS " Status = '${rm_retval}'") + message(STATUS " Output = '${rm_out}'") + message(STATUS " Error = '${rm_err}'") + message(FATAL_ERROR "Exiting - uninstall may be incomplete.") + endif() -endforeach (file) +endforeach(file) |
