summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-22 14:19:27 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-22 14:19:27 +0100
commit94ca07cfbfe0016d70963c055c87fe14f8622a4d (patch)
tree28dc91dc948287f802d9628a2ea715e1d4e0be49 /CMakeLists.txt
parentChunk is now warnings clean (diff)
parentUpdate GETTING-STARTED.md (diff)
downloadcuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.gz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.bz2
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.lz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.xz
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.tar.zst
cuberite-94ca07cfbfe0016d70963c055c87fe14f8622a4d.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
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)