summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-12-27 11:51:08 +0100
committermadmaxoft <github@xoft.cz>2013-12-27 11:51:08 +0100
commit1cf6502be23ff78e07a96b906738c97805120ca0 (patch)
treea3dad40d5fd0556b17e1b95ce80e67e6f24b6fe2 /src/CMakeLists.txt
parentAdded proper precompiled headers for MSVC. (diff)
downloadcuberite-1cf6502be23ff78e07a96b906738c97805120ca0.tar
cuberite-1cf6502be23ff78e07a96b906738c97805120ca0.tar.gz
cuberite-1cf6502be23ff78e07a96b906738c97805120ca0.tar.bz2
cuberite-1cf6502be23ff78e07a96b906738c97805120ca0.tar.lz
cuberite-1cf6502be23ff78e07a96b906738c97805120ca0.tar.xz
cuberite-1cf6502be23ff78e07a96b906738c97805120ca0.tar.zst
cuberite-1cf6502be23ff78e07a96b906738c97805120ca0.zip
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 107ca60dd..88e469b74 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -49,9 +49,15 @@ else ()
source_group("" FILES ${SOURCE})
# Precompiled headers (1st part)
- SET(PrecompiledBinary "$(IntDir)/Globals.pch")
SET_SOURCE_FILES_PROPERTIES(
- Globals.cpp PROPERTIES COMPILE_FLAGS "/Yc\"Globals.h\" /Fp\"${PrecompiledBinary}\""
+ Globals.cpp PROPERTIES COMPILE_FLAGS "/Yc\"Globals.h\""
+ )
+ # CMake cannot "remove" the precompiled header flags, so we use a dummy precompiled header compatible with just this one file:
+ SET_SOURCE_FILES_PROPERTIES(
+ Bindings/Bindings.cpp PROPERTIES COMPILE_FLAGS "/Yc\"string.h\" /Fp\"$(IntDir)/Bindings.pch\""
+ )
+ SET_SOURCE_FILES_PROPERTIES(
+ "StackWalker.cpp LeakFinder.h" PROPERTIES COMPILE_FLAGS "/Yc\"Globals.h\""
)
endif()
@@ -66,10 +72,11 @@ endif ()
add_executable(${EXECUTABLE} ${SOURCE})
+# Precompiled headers (2nd part)
if (WIN32)
SET_TARGET_PROPERTIES(
- ${EXECUTABLE} PROPERTIES COMPILE_FLAGS "/Yu\"Globals.h\" /FI\"${PrecompiledBinary}\" /Fp\"${PrecompiledBinary}\""
- OBJECT_DEPENDS "${PrecompiledBinary}"
+ ${EXECUTABLE} PROPERTIES COMPILE_FLAGS "/Yu\"Globals.h\""
+ OBJECT_DEPENDS "$(IntDir)/$(TargetName.pch)"
)
endif ()
@@ -79,4 +86,7 @@ if (NOT WIN32)
target_link_libraries(${EXECUTABLE} Protocol Generating WorldStorage)
target_link_libraries(${EXECUTABLE} Mobs Entities Simulator UI BlockEntities)
endif ()
-target_link_libraries(${EXECUTABLE} md5 luaexpat iniFile jsoncpp cryptopp zlib lua)
+if (WIN32)
+ target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
+endif()
+target_link_libraries(${EXECUTABLE} md5 luaexpat iniFile jsoncpp cryptopp zlib lua sqlite)