summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Bindings/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt28
2 files changed, 25 insertions, 5 deletions
diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt
index 469daddec..41c641d9d 100644
--- a/src/Bindings/CMakeLists.txt
+++ b/src/Bindings/CMakeLists.txt
@@ -12,7 +12,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../")
#add any new generation dependencies here
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/virtual_method_hooks.lua ${CMAKE_CURRENT_SOURCE_DIR}/AllToLua.pkg tolua
)
-
+
#add cpp files here
add_library(Bindings PluginManager LuaState WebPlugin Bindings ManualBindings LuaWindow Plugin PluginLua WebPlugin)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a557b7dac..00c3059b5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -45,6 +45,24 @@ include_directories("${PROJECT_SOURCE_DIR}")
source_group("" FILES ${SOURCE})
+#precompiledheaders
+
+file(GLOB_RECURSE HEADERS
+ "*.h"
+)
+
+foreach(header ${HEADERS})
+ set(FLAGS "/Yu ${header} /Yc ${header}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FLAGS}")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAGS}")
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${FLAGS}")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${FLAGS}")
+ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${FLAGS}")
+ set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_PROFILE} ${FLAGS}")
+ set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${FLAGS}")
+endforeach()
+
endif()
list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp")
@@ -57,7 +75,9 @@ endif()
add_executable(${EXECUTABLE} ${SOURCE})
-target_link_libraries(${EXECUTABLE} OSSupport HTTPServer iniFile Bindings Items Blocks)
-target_link_libraries(${EXECUTABLE} Protocol Generating WorldStorage jsoncpp cryptopp)
-target_link_libraries(${EXECUTABLE} Mobs Entities Simulator UI zlib lua BlockEntities)
-target_link_libraries(${EXECUTABLE} md5 luaexpat)
+if(NOT WIN32)
+target_link_libraries(${EXECUTABLE} OSSupport HTTPServer Bindings Items Blocks)
+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)