diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-09-15 12:13:54 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-09-15 12:13:54 +0200 |
commit | fd0a7ba871060c895fdf701799dbf649ee697078 (patch) | |
tree | 88c6d64fce3df94b545b2c13b3c7178d465b3f03 /src/common/CMakeLists.txt | |
parent | 6a5b24cacc4ea2eb55c481c400621a97d940b905 (diff) |
Core/CrashHandler: Compile WheatyExceptionReport only once and moved its global variable initializer to all projects using it
Diffstat (limited to 'src/common/CMakeLists.txt')
-rw-r--r-- | src/common/CMakeLists.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 7b72bf845ca..0b365a7a712 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -12,16 +12,17 @@ CollectSourceFiles( ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE_SOURCES # Exclude - ${CMAKE_CURRENT_SOURCE_DIR}/Debugging + ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Windows ${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 -# It needs to be included both in authserver and worldserver for the static global variable to be properly initialized -# and to handle crash logs on windows -list(APPEND PRIVATE_SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Errors.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Errors.h) +if(WIN32) + CollectSourceFiles( + ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Windows + WINDOWS_DEBUGGING_SOURCES) + list(APPEND PRIVATE_SOURCES + ${WINDOWS_DEBUGGING_SOURCES}) +endif() if(USE_COREPCH) set(PRIVATE_PCH_HEADER PrecompiledHeaders/commonPCH.h) |