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__