From bddcecd28ad2046ab9b13617a04cb4831510da88 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 12 Feb 2024 16:33:40 +0100 Subject: CMake: set FLTK_VERSION and FLTK_FLUID_EXECUTABLE in the cache This is useful if FLTK is built as a subproject, for instance by using FetchContent. --- fluid/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fluid') diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt index 28b5db745..66f16a99f 100644 --- a/fluid/CMakeLists.txt +++ b/fluid/CMakeLists.txt @@ -177,8 +177,13 @@ if(WIN32) list(APPEND TARGETS fluid-cmd) add_executable(fluid-cmd fluid.cxx) target_link_libraries(fluid-cmd PRIVATE fluid-lib) + set(FLTK_FLUID_EXECUTABLE fltk::fluid-cmd) +else() + set(FLTK_FLUID_EXECUTABLE fltk::fluid) endif() +set(FLTK_FLUID_EXECUTABLE "${FLTK_FLUID_EXECUTABLE}" PARENT_SCOPE) + # Create aliases for all targets foreach(tgt ${TARGETS}) -- cgit v1.2.3