From ede381c00540831d965cae5ac8bcd31c2e34fc92 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 12 Sep 2023 23:18:46 +0200 Subject: Fix Visual Studio shared library build Todo: fluid-shared can't (yet) be built agains the shared fltk lib because of some linker errors. Needs investigation. Note: fluid-shared is basically a test program to demonstrate linking against the shared FLTK libs but doesn't work yet using VS (MSVC). This is no problem for the functionality. --- fluid/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fluid') diff --git a/fluid/CMakeLists.txt b/fluid/CMakeLists.txt index 62eec124d..124547f08 100644 --- a/fluid/CMakeLists.txt +++ b/fluid/CMakeLists.txt @@ -166,9 +166,12 @@ if (OPTION_BUILD_SHARED_LIBS) list (APPEND FLUID_TARGETS fluid-shared) add_executable (fluid-shared fluid.cxx fluid.h) if (MSVC) - target_link_libraries (fluid-shared fluid-lib fltk_SHARED) + # Todo: this should link against fltk_SHARED rather than fltk_images but for an unknown + # reason this would issue link errors (about 25 undefined symbols). Needs investigation. + # AlbrechtS: Sep. 12, 2023 + target_link_libraries (fluid-shared PRIVATE fluid-lib fltk_images) # should be: fltk_SHARED) else () - target_link_libraries (fluid-shared fluid-lib fltk_images_SHARED) + target_link_libraries (fluid-shared PRIVATE fluid-lib fltk_images_SHARED) endif (MSVC) endif () -- cgit v1.2.3