refactor(Core/Common): generalise platform specific includes in common/Platform (#5058)

This commit is contained in:
Kargatum
2021-04-06 19:24:16 +07:00
committed by GitHub
parent 3db8a9b09b
commit 72748ee9f1
5 changed files with 9 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ CollectSourceFiles(
PRIVATE_SOURCES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/Debugging
${CMAKE_CURRENT_SOURCE_DIR}/Platform
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
# Manually set sources for Debugging directory as we don't want to include WheatyExceptionReport in common project

View File

@@ -9,11 +9,17 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Crash logs for windows
# Specified files for Windows
if (WIN32)
# Crash logs
set(winDebugging
${CMAKE_SOURCE_DIR}/src/common/Debugging/WheatyExceptionReport.cpp
${CMAKE_SOURCE_DIR}/src/common/Debugging/WheatyExceptionReport.h)
# Service
set(winService
${CMAKE_SOURCE_DIR}/src/common/Platform/ServiceWin32.cpp
${CMAKE_SOURCE_DIR}/src/common/Platform/ServiceWin32.h)
endif()
add_subdirectory(shared)

View File

@@ -16,7 +16,7 @@ CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if( WIN32 )
list(APPEND PRIVATE_SOURCES ${winDebugging})
list(APPEND PRIVATE_SOURCES ${winDebugging} ${winService})
if ( MSVC )
list(APPEND PRIVATE_SOURCES worldserver.rc)
endif()