CMake: don't export unnecessary executable files

Exporting executable files means that they would appear in the CMake
config files as "imported targets". This could break the config files
of Linux and other distributions if such executables are not installed
when building FLTK programs.

The only executable files that need to be exported are the `fluid`
executables that may be used to convert .fl files during building.
This commit is contained in:
Albrecht Schlosser
2026-02-07 20:08:23 +01:00
parent 2521c8a519
commit 8b4af06a96
3 changed files with 50 additions and 25 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
# Installation support for building the FLTK project using CMake (www.cmake.org)
# Originally written by Michael Surette
#
# Copyright 1998-2025 by Bill Spitzak and others.
# Copyright 1998-2026 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
@@ -141,8 +141,8 @@ if(FLTK_BUILD_TEST) # "OR FLTK_BUILD_GAMES" (not yet implemented)
else()
set(tgt_ ${game_})
endif()
# note: do NOT "export" games - this could break CMake config files
install(TARGETS ${tgt_}
EXPORT FLTK-Targets
RUNTIME DESTINATION ${FLTK_BINDIR}
LIBRARY DESTINATION ${FLTK_LIBDIR}
ARCHIVE DESTINATION ${FLTK_LIBDIR}