summaryrefslogtreecommitdiff
path: root/CMake/FLTK-Functions.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/FLTK-Functions.cmake
parent57f61cf5a06f382a5fc6df60a5019d06f10df477 (diff)
Make building Fluid optional. (#539)
Diffstat (limited to 'CMake/FLTK-Functions.cmake')
-rw-r--r--CMake/FLTK-Functions.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMake/FLTK-Functions.cmake b/CMake/FLTK-Functions.cmake
index 460f89fbf..009653721 100644
--- a/CMake/FLTK-Functions.cmake
+++ b/CMake/FLTK-Functions.cmake
@@ -22,6 +22,12 @@
# USAGE: FLTK_RUN_FLUID TARGET_NAME "FLUID_SOURCE [.. FLUID_SOURCE]"
function (FLTK_RUN_FLUID TARGET SOURCES)
+
+ if (NOT FLTK_FLUID_EXECUTABLE)
+ message (WARNING "Not building ${SOURCES}. FLUID executable not found.")
+ return ()
+ endif (NOT FLTK_FLUID_EXECUTABLE)
+
set (CXX_FILES)
foreach (src ${SOURCES})
if ("${src}" MATCHES "\\.fl$")
@@ -36,6 +42,7 @@ function (FLTK_RUN_FLUID TARGET SOURCES)
endif ("${src}" MATCHES "\\.fl$")
endforeach ()
set (${TARGET} ${CXX_FILES} PARENT_SCOPE)
+
endfunction (FLTK_RUN_FLUID TARGET SOURCES)
#######################################################################