diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-08-09 14:11:42 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-08-09 14:11:42 +0000 |
| commit | 78d853891c145776e19e412b4956fed87a33bf60 (patch) | |
| tree | 208be0977778d912bb06d6ef99953bca49556989 /CMake/macros.cmake | |
| parent | e5e7fa9b1ee64a1f6d3688930ce162668093a3c1 (diff) | |
[CMake] Fix Windows dll build with Visual Studio generator.
Now you can set OPTION_BUILD_SHARED_LIBS:BOOL=ON to build FLTK dll's with
Visual Studio. Tested and works (Visual Studio 2010 + 2015).
Note: Linux fixes included, tested and works (Ubuntu).
Todo: dll names and target directories may need some changes.
We really need to get rid of that "_SHARED" suffix in .so names.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'CMake/macros.cmake')
| -rw-r--r-- | CMake/macros.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/CMake/macros.cmake b/CMake/macros.cmake index 242153c3a..d6f4fa5a5 100644 --- a/CMake/macros.cmake +++ b/CMake/macros.cmake @@ -1,7 +1,7 @@ # # "$Id$" # -# macros.cmake defines macros used by the build system +# macros.cmake defines macros used by the CMake build system # Written by Michael Surette # # Copyright 1998-2016 by Bill Spitzak and others. @@ -29,17 +29,17 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES) endif (${LIBTYPE} STREQUAL "SHARED") if (MSVC) - set (LIBNAME_DEBUG "${LIBNAME}d") + set (LIBRARY_NAME_DEBUG "${LIBRARY_NAME}d") else () - set (LIBNAME_DEBUG "${LIBNAME}") + set (LIBRARY_NAME_DEBUG "${LIBRARY_NAME}") endif (MSVC) add_library(${LIBRARY_NAME} ${LIBTYPE} ${LIBFILES}) set_target_properties(${LIBRARY_NAME} PROPERTIES - OUTPUT_NAME ${LIBNAME} - DEBUG_OUTPUT_NAME "${LIBNAME_DEBUG}" + OUTPUT_NAME ${LIBRARY_NAME} + DEBUG_OUTPUT_NAME ${LIBRARY_NAME_DEBUG} CLEAN_DIRECT_OUTPUT TRUE COMPILE_DEFINITIONS "FL_LIBRARY" ) @@ -55,7 +55,7 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES) if (MSVC) if (OPTION_LARGE_FILE) - set_target_properties(${LIBNAME} + set_target_properties(${LIBRARYNAME} PROPERTIES LINK_FLAGS /LARGEADDRESSAWARE ) |
