From b1766627a7ac72ef1a9257b57076f0bd10c55786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 23 Jul 2013 12:27:37 +0200 Subject: [PATCH] Treat MagnumMathObjects and MagnumObjects libs separately for exporting. It's more intuitive and might be useful at some point. --- src/CMakeLists.txt | 3 ++- src/magnumVisibility.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d73655b32..cee41dec2 100644 --- a/src/CMakeLists.txt +++ b/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} diff --git a/src/magnumVisibility.h b/src/magnumVisibility.h index 60e1f8cca..09ac087ed 100644 --- a/src/magnumVisibility.h +++ b/src/magnumVisibility.h @@ -26,7 +26,7 @@ #include -#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