diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/common/Logging/Log.h | 2 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 328cc4faad..22c7d5fd76 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -16,8 +16,21 @@ CollectSourceFiles( # Exclude ${CMAKE_CURRENT_SOURCE_DIR}/Debugging ${CMAKE_CURRENT_SOURCE_DIR}/Platform + ${CMAKE_CURRENT_SOURCE_DIR}/Collision + ${CMAKE_CURRENT_SOURCE_DIR}/Navigation ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders) +if (BUILD_APPLICATION_WORLDSERVER OR BUILD_TOOLS_MAPS) + unset(PRIVATE_SOURCES) + CollectSourceFiles( + ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE_SOURCES + # Exclude + ${CMAKE_CURRENT_SOURCE_DIR}/Debugging + ${CMAKE_CURRENT_SOURCE_DIR}/Platform + ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders) +endif() + # 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 @@ -55,8 +68,6 @@ target_link_libraries(common PUBLIC boost argon2 - g3dlib - Detour sfmt utf8cpp openssl @@ -65,6 +76,13 @@ target_link_libraries(common stdfs fmt) +if (BUILD_APPLICATION_WORLDSERVER OR BUILD_TOOLS_MAPS) + target_link_libraries(common + PUBLIC + g3dlib + Detour) +endif() + set_target_properties(common PROPERTIES FOLDER diff --git a/src/common/Logging/Log.h b/src/common/Logging/Log.h index 32ace618c6..bf349227b8 100644 --- a/src/common/Logging/Log.h +++ b/src/common/Logging/Log.h @@ -60,7 +60,7 @@ private: public: static Log* instance(); - void Initialize(Acore::Asio::IoContext* ioContext); + void Initialize(Acore::Asio::IoContext* ioContext = nullptr); void SetSynchronous(); // Not threadsafe - should only be called from main() after all threads are joined void LoadFromConfig(); void Close(); |