FLTK logo

[master] 9cdd457 - CMake: make compile definition "FL_DLL" public for MSVC (#960)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 9cdd457 - CMake: make compile definition "FL_DLL" public for MSVC (#960) "Albrecht Schlosser" 09:47 Apr 27  
 
commit 9cdd457382ea5da11c3dfa49320d920dc7ea7dfd
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Sat Apr 27 18:35:39 2024 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Sat Apr 27 18:35:39 2024 +0200

    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...

 CMake/fl_add_library.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git CMake/fl_add_library.cmake CMake/fl_add_library.cmake
index ebf9e28..c4e5f91 100644
--- CMake/fl_add_library.cmake
+++ 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")
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.