summaryrefslogtreecommitdiff
path: root/CMake/export.cmake
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2022-11-13 20:16:54 +0100
committerGitHub <noreply@github.com>2022-11-13 20:16:54 +0100
commitedf7510dda6b62905920fbf3a2fe01abbeab920e (patch)
treef8af26ccb91f0e07265d713b64ec32eb7ad151cf /CMake/export.cmake
parent57f61cf5a06f382a5fc6df60a5019d06f10df477 (diff)
Make building Fluid optional. (#539)
Diffstat (limited to 'CMake/export.cmake')
-rw-r--r--CMake/export.cmake22
1 files changed, 11 insertions, 11 deletions
diff --git a/CMake/export.cmake b/CMake/export.cmake
index 9f8170051..828d4370d 100644
--- a/CMake/export.cmake
+++ b/CMake/export.cmake
@@ -21,16 +21,7 @@
# Set the fluid executable path used to create .cxx/.h from .fl files
-if (CMAKE_CROSSCOMPILING)
- # find a fluid executable on the host system
- find_file(FLUID_PATH
- NAMES fluid fluid.exe
- PATHS ENV PATH
- NO_CMAKE_FIND_ROOT_PATH
- )
- set (FLTK_FLUID_EXECUTABLE ${FLUID_PATH})
- set (FLUID_EXPORT "") # don't export fluid
-else ()
+if (FLTK_BUILD_FLUID AND NOT CMAKE_CROSSCOMPILING)
# use the fluid executable we build
if (WIN32)
set (FLTK_FLUID_EXECUTABLE fluid-cmd)
@@ -39,7 +30,16 @@ else ()
set (FLTK_FLUID_EXECUTABLE fluid)
set (FLUID_EXPORT fluid) # export fluid
endif ()
-endif (CMAKE_CROSSCOMPILING)
+else ()
+ # find a fluid executable on the host system
+ find_file(FLUID_PATH
+ NAMES fluid fluid.exe
+ PATHS ENV PATH
+ NO_CMAKE_FIND_ROOT_PATH
+ )
+ set (FLTK_FLUID_EXECUTABLE ${FLUID_PATH})
+ set (FLUID_EXPORT "") # don't export fluid
+endif (FLTK_BUILD_FLUID AND NOT CMAKE_CROSSCOMPILING)
# generate FLTK-Targets.cmake for build directory use
export (TARGETS ${FLUID_EXPORT} ${FLTK_LIBRARIES} FILE ${CMAKE_CURRENT_BINARY_DIR}/FLTK-Targets.cmake)