summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2024-04-27 18:35:39 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2024-04-27 18:35:39 +0200
commit9cdd457382ea5da11c3dfa49320d920dc7ea7dfd (patch)
tree2e1800595dfeb0bd8a144f7d12a8e53f1ac2dfab
parente4b0668fad36fe28497cf5fa9242e92b0865c90f (diff)
CMake: make compile definition "FL_DLL" public for MSVC (#960)
Visual Studio projects that link to the FLTK DLL (fltk::fltk-shared) inherit the compile definition set by the DLL target and will be compiled with "-D FL_DLL" as required w/o the user project having to set this preprocessor macro explicitly. Todo: documentation will follow...
-rw-r--r--CMake/fl_add_library.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMake/fl_add_library.cmake b/CMake/fl_add_library.cmake
index ebf9e28c0..c4e5f91c4 100644
--- a/CMake/fl_add_library.cmake
+++ b/CMake/fl_add_library.cmake
@@ -197,7 +197,7 @@ function(fl_add_library LIBNAME LIBTYPE SOURCES)
OUTPUT_NAME_DEBUG ${LIBNAME}_dlld
OUTPUT_NAME_RELEASE ${LIBNAME}_dll
)
- target_compile_definitions(${TARGET_NAME} PRIVATE FL_DLL)
+ target_compile_definitions(${TARGET_NAME} PUBLIC FL_DLL)
endif(MSVC)
endif(LIBTYPE STREQUAL "SHARED")