Browse Source

Treat MagnumMathObjects and MagnumObjects libs separately for exporting.

It's more intuitive and might be useful at some point.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
b1766627a7
  1. 3
      src/CMakeLists.txt
  2. 2
      src/magnumVisibility.h

3
src/CMakeLists.txt

@ -156,7 +156,8 @@ set(MagnumMath_SRCS
# TODO: fix when CMake sets target_EXPORTS for OBJECT targets as well
add_library(MagnumMathObjects OBJECT ${MagnumMath_SRCS})
add_library(MagnumObjects OBJECT ${Magnum_SRCS})
set_target_properties(MagnumObjects MagnumMathObjects PROPERTIES COMPILE_FLAGS "-DMagnumObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
set_target_properties(MagnumMathObjects PROPERTIES COMPILE_FLAGS "-DMagnumMathObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
set_target_properties(MagnumObjects PROPERTIES COMPILE_FLAGS "-DMagnumObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
# Main library
add_library(Magnum ${SHARED_OR_STATIC}

2
src/magnumVisibility.h

@ -26,7 +26,7 @@
#include <Utility/Visibility.h>
#if defined(Magnum_EXPORTS) || defined(MagnumObjects_EXPORTS)
#if defined(Magnum_EXPORTS) || defined(MagnumObjects_EXPORTS) || defined(MagnumMathObjects_EXPORTS)
#define MAGNUM_EXPORT CORRADE_VISIBILITY_EXPORT
#else
#define MAGNUM_EXPORT CORRADE_VISIBILITY_IMPORT

Loading…
Cancel
Save