Merge branch 'cmake' of github.com:worktycho/MCServer into cmake
This commit is contained in:
commit
b4fb8ace03
@ -14,4 +14,6 @@ else()
|
||||
add_library(lua SHARED ${SOURCE})
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
target_link_libraries(lua m)
|
||||
endif()
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user