mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-28 20:27:46 +00:00
Cotire flag
This commit is contained in:
parent
f2684f6c7d
commit
c8963653b0
4 changed files with 21 additions and 5 deletions
|
@ -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 #
|
||||
##############################
|
||||
|
|
|
@ -12,6 +12,11 @@ set(RUNTIME_OUTPUT_DIRECTORY "${SCRIPT_LIB_DIR}")
|
|||
|
||||
|
||||
file(GLOB children "${CMAKE_CURRENT_SOURCE_DIR}/*" )
|
||||
|
||||
if(Cotire_ENABLED)
|
||||
message( "Cotire enabled for scripts" )
|
||||
endif()
|
||||
|
||||
foreach(_scriptDir ${children})
|
||||
get_filename_component(_name "${_scriptDir}" NAME_WE)
|
||||
if(IS_DIRECTORY ${_scriptDir} AND NOT ${_name} MATCHES "CMakeFiles")
|
||||
|
@ -57,8 +62,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"
|
||||
|
|
|
@ -27,4 +27,8 @@ else()
|
|||
endif()
|
||||
|
||||
target_link_libraries(sapphire_lobby ${Boost_LIBRARIES} ${Boost_LIBRARIES})
|
||||
cotire( sapphire_lobby )
|
||||
|
||||
if(Cotire_ENABLED)
|
||||
message( "Cotire enabled for sapphire_lobby" )
|
||||
cotire( sapphire_lobby )
|
||||
endif()
|
||||
|
|
|
@ -67,6 +67,7 @@ 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)
|
||||
message( "Cotire enabled for sapphire_zone" )
|
||||
cotire( sapphire_zone )
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue