Skip to content

Commit

Permalink
CMake: make compile definition "FL_DLL" public for MSVC (#960)
Browse files Browse the repository at this point in the history
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...
  • Loading branch information
Albrecht Schlosser committed Apr 27, 2024
1 parent e4b0668 commit 9cdd457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMake/fl_add_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 9cdd457

Please sign in to comment.