mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
[Code] Optimize PCH Config (Faster Builds) (#4951)
This commit is contained in:
parent
5ac9dd04e4
commit
4005b68383
@ -842,7 +842,7 @@ IF (UNIX)
|
|||||||
ENDIF (UNIX)
|
ENDIF (UNIX)
|
||||||
|
|
||||||
IF (WIN32 AND EQEMU_BUILD_PCH)
|
IF (WIN32 AND EQEMU_BUILD_PCH)
|
||||||
TARGET_PRECOMPILE_HEADERS(common PRIVATE pch/pch.h)
|
TARGET_PRECOMPILE_HEADERS(common PRIVATE pch/std-pch.h)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||||
|
|||||||
7
common/pch/app-pch.h
Normal file
7
common/pch/app-pch.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include "../types.h"
|
||||||
|
#include "../database.h"
|
||||||
|
#include "../strings.h"
|
||||||
|
#include "../eqemu_logsys.h"
|
||||||
|
#include "../eqemu_logsys_log_aliases.h"
|
||||||
|
#include "../features.h"
|
||||||
|
#include "../global_define.h"
|
||||||
@ -77,7 +77,7 @@ ADD_EXECUTABLE(world ${world_sources} ${world_headers})
|
|||||||
INSTALL(TARGETS world RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
INSTALL(TARGETS world RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
IF (WIN32 AND EQEMU_BUILD_PCH)
|
IF (WIN32 AND EQEMU_BUILD_PCH)
|
||||||
TARGET_PRECOMPILE_HEADERS(world PRIVATE ../common/pch/pch.h)
|
TARGET_PRECOMPILE_HEADERS(world PRIVATE ../common/pch/std-pch.h)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DWORLD)
|
ADD_DEFINITIONS(-DWORLD)
|
||||||
|
|||||||
@ -480,13 +480,15 @@ ADD_EXECUTABLE(zone ${zone_sources} ${zone_headers})
|
|||||||
# binary output directory
|
# binary output directory
|
||||||
INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
|
|
||||||
# precompile headers
|
# precompiled headers
|
||||||
IF (WIN32 AND EQEMU_BUILD_PCH)
|
IF (WIN32 AND EQEMU_BUILD_PCH)
|
||||||
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/pch.h)
|
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/std-pch.h)
|
||||||
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/types.h ../common/eqemu_logsys.h ../common/eqemu_logsys_log_aliases.h ../common/features.h ../common/global_define.h)
|
|
||||||
TARGET_PRECOMPILE_HEADERS(zone PRIVATE mob.h npc.h corpse.h doors.h bot.h entity.h client.h zone.h)
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# precompiled headers
|
||||||
|
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/app-pch.h)
|
||||||
|
TARGET_PRECOMPILE_HEADERS(zone PRIVATE merc.h mob.h npc.h corpse.h doors.h bot.h entity.h client.h zone.h)
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DZONE)
|
ADD_DEFINITIONS(-DZONE)
|
||||||
|
|
||||||
# link lua_zone unity build against luabind
|
# link lua_zone unity build against luabind
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user