diff options
author | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-21 14:33:09 +0100 |
---|---|---|
committer | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-21 14:33:09 +0100 |
commit | b4fb8ace030156cea0ac109cc30fa27c2517ea72 (patch) | |
tree | 9e82382d81d948b5801de74376fee46229ee8ba1 | |
parent | Merge branch 'master' into cmake (diff) | |
parent | added precompiled headers (diff) | |
download | cuberite-b4fb8ace030156cea0ac109cc30fa27c2517ea72.tar cuberite-b4fb8ace030156cea0ac109cc30fa27c2517ea72.tar.gz cuberite-b4fb8ace030156cea0ac109cc30fa27c2517ea72.tar.bz2 cuberite-b4fb8ace030156cea0ac109cc30fa27c2517ea72.tar.lz cuberite-b4fb8ace030156cea0ac109cc30fa27c2517ea72.tar.xz cuberite-b4fb8ace030156cea0ac109cc30fa27c2517ea72.tar.zst cuberite-b4fb8ace030156cea0ac109cc30fa27c2517ea72.zip |
-rw-r--r-- | lib/lua/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/Bindings/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/CMakeLists.txt | 28 |
3 files changed, 27 insertions, 5 deletions
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt index ed1627a67..695d75e7e 100644 --- a/lib/lua/CMakeLists.txt +++ b/lib/lua/CMakeLists.txt @@ -14,4 +14,6 @@ else() add_library(lua SHARED ${SOURCE}) endif() +if(UNIX) target_link_libraries(lua m) +endif()
\ No newline at end of file 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) |