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