It is now possible to use CMake on windows for proper build (PCH support included)
Merged PCH header into gamePCH since they became the same after these changes --HG-- branch : trunk rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
######## game ########
|
||||
|
||||
# Enable precompiled headers when using the GCC compiler.
|
||||
if(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(DO_PCH)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
@@ -279,11 +279,22 @@ if(NOT DO_SCRIPTS)
|
||||
message("-- Added basic scriptAI-engines to GAME library")
|
||||
endif()
|
||||
|
||||
# Add gamePCH.cpp to project on Windows
|
||||
if(MSVC)
|
||||
set(game_STAT_SRCS
|
||||
PrecompiledHeaders/gamePCH.cpp
|
||||
${game_STAT_SRCS})
|
||||
endif()
|
||||
|
||||
add_library(game STATIC ${game_STAT_SRCS})
|
||||
|
||||
add_dependencies(game revision.h)
|
||||
|
||||
# Generate precompiled header
|
||||
if(DO_PCH AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_precompiled_header(game ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/NixCorePCH.h)
|
||||
if(DO_PCH)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_precompiled_header(game ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/gamePCH.h)
|
||||
elseif(MSVC)
|
||||
add_native_precompiled_header(game ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/gamePCH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include "NixCorePCH.h"
|
||||
@@ -1 +0,0 @@
|
||||
#include "WinCorePCH.h"
|
||||
@@ -1,14 +0,0 @@
|
||||
//add here most rarely modified headers to speed up debug build compilation
|
||||
#include "..\Server\WorldSocket.h" // must be first to make ACE happy with ACE includes in it
|
||||
#include "..\..\shared\Common.h"
|
||||
|
||||
#include "..\Maps\MapManager.h"
|
||||
#include "..\..\shared\Logging\Log.h"
|
||||
#include "..\Globals\ObjectAccessor.h"
|
||||
#include "..\Entities\Object\ObjectDefines.h"
|
||||
#include "..\..\shared\Database/SQLStorage.h"
|
||||
#include "..\Protocol\Opcodes.h"
|
||||
#include "..\Miscellaneous\SharedDefines.h"
|
||||
#include "..\Globals\ObjectMgr.h"
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
@@ -0,0 +1 @@
|
||||
#include "gamePCH.h"
|
||||
Reference in New Issue
Block a user