From e34b86e5c2f36f94adf4fbcdd014990a87e1866c Mon Sep 17 00:00:00 2001 From: Jan Borsodi Date: Tue, 14 Sep 2010 12:34:02 +0200 Subject: [PATCH] Added new define CAELUM_STATIC which will disable all dllexport for the caelum project. Made sure the define is set for both openmw and caelum. --- CMakeLists.txt | 3 +++ extern/caelum/CMakeLists.txt | 2 +- extern/caelum/include/CaelumPrerequisites.h | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb591089e..01ca18540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -232,6 +232,9 @@ add_subdirectory( extern/mygui_3.0.1 ) # MyGUI: extern/mygui_3.0.0/ add_definitions(-DMYGUI_STATIC) +# Caelum: extern/caelum/ +add_definitions(-DCAELUM_STATIC) + # Specify build paths set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}") diff --git a/extern/caelum/CMakeLists.txt b/extern/caelum/CMakeLists.txt index b95b3fd8c..c1854904c 100755 --- a/extern/caelum/CMakeLists.txt +++ b/extern/caelum/CMakeLists.txt @@ -4,7 +4,7 @@ IF(MSVC) add_definitions("-D_SCL_SECURE_NO_WARNINGS /wd4305 /wd4244" ) ENDIF(MSVC) -ADD_DEFINITIONS(-DCAELUM_LIB) +ADD_DEFINITIONS(-DCAELUM_STATIC) INCLUDE_DIRECTORIES( ${CMAKE_HOME_DIRECTORY}/extern/caelum/include ${OGRE_INCLUDE_DIR}/Ogre diff --git a/extern/caelum/include/CaelumPrerequisites.h b/extern/caelum/include/CaelumPrerequisites.h index 901901c2e..093b3ab5a 100644 --- a/extern/caelum/include/CaelumPrerequisites.h +++ b/extern/caelum/include/CaelumPrerequisites.h @@ -32,7 +32,10 @@ along with Caelum. If not, see . // Define the dll export qualifier if compiling for Windows #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 - #ifdef CAELUM_LIB + #ifdef CAELUM_STATIC + // Don't use dll export qualifier when built as a static lib + #define CAELUM_EXPORT + #elif CAELUM_LIB #define CAELUM_EXPORT __declspec (dllexport) #else #ifdef __MINGW32__