Created
April 13, 2016 12:30
-
-
Save Naios/4f3533fe96ae759d063120c2cef72ce4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt | |
index 60e8609..239e59d 100644 | |
--- a/src/server/game/CMakeLists.txt | |
+++ b/src/server/game/CMakeLists.txt | |
@@ -23,27 +23,36 @@ GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) | |
add_definitions(-DTRINITY_API_EXPORT_GAME) | |
-add_library(game | |
- ${PRIVATE_PCH_SOURCE} | |
- ${PRIVATE_SOURCES} | |
-) | |
- | |
CollectIncludeDirectories( | |
${CMAKE_CURRENT_SOURCE_DIR} | |
PUBLIC_INCLUDES | |
# Exclude | |
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders) | |
+# Provide an interface target for the game project to allow | |
+# dependent projects to build meanwhile. | |
+add_library(game-interface INTERFACE) | |
+ | |
+target_include_directories(game-interface | |
+ INTERFACE | |
+ ${PUBLIC_INCLUDES}) | |
+ | |
+target_link_libraries(game-interface | |
+ INTERFACE | |
+ shared | |
+ Detour) | |
+ | |
+add_library(game | |
+ ${PRIVATE_PCH_SOURCE} | |
+ ${PRIVATE_SOURCES}) | |
+ | |
target_include_directories(game | |
- PUBLIC | |
- ${PUBLIC_INCLUDES} | |
PRIVATE | |
${CMAKE_CURRENT_BINARY_DIR}) | |
target_link_libraries(game | |
PUBLIC | |
- shared | |
- Detour | |
+ game-interface | |
PRIVATE | |
efsw) | |
diff --git a/src/server/scripts/CMakeLists.txt b/src/server/scripts/CMakeLists.txt | |
index 83870fe..31ba073 100644 | |
--- a/src/server/scripts/CMakeLists.txt | |
+++ b/src/server/scripts/CMakeLists.txt | |
@@ -206,7 +206,7 @@ add_library(scripts STATIC | |
target_link_libraries(scripts | |
PUBLIC | |
- game) | |
+ game-interface) | |
target_include_directories(scripts | |
PUBLIC | |
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt | |
index 837f236..a7324df 100644 | |
--- a/src/server/worldserver/CMakeLists.txt | |
+++ b/src/server/worldserver/CMakeLists.txt | |
@@ -47,6 +47,7 @@ set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAG | |
target_link_libraries(worldserver | |
PUBLIC | |
+ game | |
scripts | |
gsoap | |
readline) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment