1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-28 20:27:46 +00:00
This commit is contained in:
Maru 2018-03-22 04:29:30 +00:00 committed by GitHub
commit 48172deaad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 6 deletions

View file

@ -11,6 +11,8 @@ set(EXECUTABLE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(Cotire_ENABLED TRUE)
##########################################################################
# Boost stuff
@ -30,7 +32,10 @@ set( LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/libraries" )
include( "cmake/boost.cmake" )
include( "cmake/mysql.cmake" )
include( "cmake/compiler.cmake" )
include( "cmake/cotire.cmake" )
if(Cotire_ENABLED)
include( "cmake/cotire.cmake" )
endif()
##############################
# Git #
##############################

@ -1 +1 @@
Subproject commit 67b949dfe3ffbbba7963b0861670ab4bb1819991
Subproject commit 4a9d6da513b1bd1f2a50e6780792df0a56120f46

View file

@ -12,6 +12,7 @@ set(RUNTIME_OUTPUT_DIRECTORY "${SCRIPT_LIB_DIR}")
file(GLOB children "${CMAKE_CURRENT_SOURCE_DIR}/*" )
foreach(_scriptDir ${children})
get_filename_component(_name "${_scriptDir}" NAME_WE)
if(IS_DIRECTORY ${_scriptDir} AND NOT ${_name} MATCHES "CMakeFiles" AND NOT ${_name} MATCHES "\\.dir$")
@ -57,8 +58,9 @@ foreach(_scriptDir ${children})
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ScriptLoader.cpp.in" "${_scriptDir}/ScriptLoader.cpp")
cotire("script_${_name}")
if( Cotire_ENABLED )
cotire("script_${_name}")
endif()
if(MSVC)
add_custom_command(TARGET "script_${_name}" POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove "${SCRIPT_LIB_DIR}/script_${_name}.exp"

View file

@ -27,4 +27,7 @@ else()
endif()
target_link_libraries(sapphire_lobby ${Boost_LIBRARIES} ${Boost_LIBRARIES})
cotire( sapphire_lobby )
if(Cotire_ENABLED)
cotire( sapphire_lobby )
endif()

View file

@ -67,6 +67,6 @@ target_link_libraries( sapphire_zone ${Boost_LIBRARIES} )
target_include_directories( sapphire_zone PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" )
target_include_directories( sapphire_zone PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Script" )
target_include_directories( sapphire_zone PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/external" )
if (UNIX)
if (UNIX AND Cotire_ENABLED)
cotire( sapphire_zone )
endif()