diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 517d0081e..b26d1a80d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -787,6 +787,9 @@ INCLUDE_DIRECTORIES(Patches SocketLib StackWalker) ADD_LIBRARY(common ${common_sources} ${common_headers} ${repositories}) +TARGET_PRECOMPILE_HEADERS(common PRIVATE pch/pch.h) + + IF (UNIX) SET_SOURCE_FILES_PROPERTIES("SocketLib/Mime.cpp" PROPERTY COMPILE_FLAGS -Wno-unused-result) SET_SOURCE_FILES_PROPERTIES("patches/sod.cpp" "patches/sof.cpp" "patches/rof.cpp" "patches/rof2.cpp" "patches/uf.cpp" PROPERTIES COMPILE_FLAGS -O0) diff --git a/common/pch/pch.h b/common/pch/pch.h index 10bc27ca6..ffb09e572 100644 --- a/common/pch/pch.h +++ b/common/pch/pch.h @@ -22,9 +22,14 @@ #include #include #include +#include +#include + // fmt -#include +//#include +# include +# define FMT_STRING(s) s // lua #include "lua.hpp" diff --git a/world/CMakeLists.txt b/world/CMakeLists.txt index c46b68d84..d28872742 100644 --- a/world/CMakeLists.txt +++ b/world/CMakeLists.txt @@ -78,6 +78,8 @@ ADD_EXECUTABLE(world ${world_sources} ${world_headers}) INSTALL(TARGETS world RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +TARGET_PRECOMPILE_HEADERS(world PRIVATE ../common/pch/pch.h) + ADD_DEFINITIONS(-DWORLD) TARGET_LINK_LIBRARIES(world ${SERVER_LIBS})