diff options
author | Mattes D <github@xoft.cz> | 2013-12-27 13:54:42 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-12-27 13:54:42 +0100 |
commit | 194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6 (patch) | |
tree | 65a4af510bf272fc302c40dd5e2b7c8302520e0c /CMakeLists.txt | |
parent | Merge pull request #476 from mc-server/apidump-writingplugin (diff) | |
parent | Lua is built statically on *nix. (diff) | |
download | cuberite-194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6.tar cuberite-194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6.tar.gz cuberite-194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6.tar.bz2 cuberite-194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6.tar.lz cuberite-194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6.tar.xz cuberite-194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6.tar.zst cuberite-194a1b208ff91fed07bfd3e38d9593d3ac9b7ac6.zip |
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 17eee02bb..0df702b29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,7 +83,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") add_definitions(-DCRYPTOPP_DISABLE_ASM) endif() -add_definitions(-DLUA_USE_DLOPEN) +# Under Windows, we need Lua as DLL; on *nix we need it linked statically: +if (WIN32) + add_definitions(-DLUA_BUILD_AS_DLL) +endif() + +# The Expat library is linked in statically, make the source files aware of that: +add_definitions(-DXML_STATIC) add_subdirectory(lib/inifile/) add_subdirectory(lib/jsoncpp/) @@ -106,10 +112,13 @@ else() add_flags("/Wall") endif() set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE_BAK}") -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic") -set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -rdynamic") -set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -rdynamic") -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_PROFILE} -rdynamic") + +if (NOT WIN32) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -rdynamic") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -rdynamic") + set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_PROFILE} -rdynamic") +endif() add_subdirectory (src) |