diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-04-02 22:08:50 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-04-03 23:47:23 +0200 |
| commit | 228d04d0e0d6e968c59bcab606e609eb1103f917 (patch) | |
| tree | c7db9621ec19d42cca8231cba957609ab868e353 /CMake/export.cmake | |
| parent | 5a8b9d9130d9c9bd0adeca33ac051eb9249953fb (diff) | |
Build and use fluid-cmd on Windows for .fl files (#224, #293)
On Windows fluid.exe is a "GUI" program and does not allow console
output which can be a problem in automated builds. In Visual Studio
the fluid GUI program would pop up console windows when generating
.cxx and .h files from .fl files.
The new (additional) fluid-cmd.exe is built as console application
for users that need it and it is used in the FLTK build process on
Windows to convert the .fl files.
Diffstat (limited to 'CMake/export.cmake')
| -rw-r--r-- | CMake/export.cmake | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/CMake/export.cmake b/CMake/export.cmake index d4ed55f3b..9f8170051 100644 --- a/CMake/export.cmake +++ b/CMake/export.cmake @@ -1,8 +1,8 @@ # # Export CMake file to build the FLTK project using CMake (www.cmake.org) -# Written by Michael Surette +# Originally written by Michael Surette # -# Copyright 1998-2021 by Bill Spitzak and others. +# Copyright 1998-2022 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 @@ -29,15 +29,20 @@ if (CMAKE_CROSSCOMPILING) NO_CMAKE_FIND_ROOT_PATH ) set (FLTK_FLUID_EXECUTABLE ${FLUID_PATH}) - set (FLUID) # don't export + set (FLUID_EXPORT "") # don't export fluid else () # use the fluid executable we build - set (FLTK_FLUID_EXECUTABLE fluid) - set (FLUID fluid) # export + if (WIN32) + set (FLTK_FLUID_EXECUTABLE fluid-cmd) + set (FLUID_EXPORT fluid fluid-cmd) # export fluid and fluid-cmd + else () + set (FLTK_FLUID_EXECUTABLE fluid) + set (FLUID_EXPORT fluid) # export fluid + endif () endif (CMAKE_CROSSCOMPILING) # generate FLTK-Targets.cmake for build directory use -export(TARGETS ${FLUID} ${FLTK_LIBRARIES} FILE ${CMAKE_CURRENT_BINARY_DIR}/FLTK-Targets.cmake) +export (TARGETS ${FLUID_EXPORT} ${FLTK_LIBRARIES} FILE ${CMAKE_CURRENT_BINARY_DIR}/FLTK-Targets.cmake) # generate FLTK-Functions.cmake for build directory use configure_file ( |
