mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Speed up the Windows build with precompiled headers.
[skip alpine ci] [skip irctest ci] [skip macos ci] [skip ubuntu ci]
This commit is contained in:
parent
e3db9ed118
commit
179bccb0c7
@ -96,6 +96,7 @@ list(SORT INSPIRCD_SOURCES)
|
||||
add_executable("inspircd" ${INSPIRCD_HEADERS} ${INSPIRCD_SOURCES} "${INSPIRCD_BASE}/win/inspircd.rc")
|
||||
add_dependencies("inspircd" "win32memory")
|
||||
target_compile_definitions("inspircd" PRIVATE "FMT_LIB_EXPORT" "INSPIRCD_CORE")
|
||||
target_precompile_headers("inspircd" PUBLIC "${INSPIRCD_BASE}/include/inspircd.h")
|
||||
set_target_properties("inspircd" PROPERTIES "ENABLE_EXPORTS" ON)
|
||||
target_link_libraries("inspircd" "win32memory")
|
||||
install(TARGETS "inspircd" RUNTIME DESTINATION ".")
|
||||
|
@ -78,6 +78,15 @@ foreach(MODULE_NAME ${INSPIRCD_MODULES})
|
||||
add_library(${BASE_NAME} MODULE ${MODULE_NAME})
|
||||
endif()
|
||||
|
||||
set(PCH_TARGET "")
|
||||
if(${PCH_TARGET})
|
||||
target_precompile_headers(${BASE_NAME} REUSE_FROM ${PCH_TARGET})
|
||||
else()
|
||||
target_precompile_headers(${BASE_NAME} PUBLIC "${INSPIRCD_BASE}/include/inspircd.h")
|
||||
set(PCH_TARGET ${BASE_NAME})
|
||||
endif()
|
||||
|
||||
|
||||
# Link against the core and memory library
|
||||
add_dependencies(${BASE_NAME} "inspircd" "win32memory")
|
||||
target_link_libraries(${BASE_NAME} "inspircd" "win32memory")
|
||||
|
Loading…
x
Reference in New Issue
Block a user