diff options
author | Kargatum <dowlandtop@yandex.com> | 2019-09-18 20:04:48 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-18 20:04:48 +0700 |
commit | 0e6c9a18f4f3f82ec431aad7101bdf58b8f5d63f (patch) | |
tree | a07b16890546f20ce671caa4cf128c70673369ed /deps | |
parent | 91d62373ccfbf17381ab149b5eb31c1cdc1a5574 (diff) |
feat(Cmake/Build): Use interface targets for inheriting flags and definitions (#2255)
Co-authored-by: Naios Naios@users.noreply.github.com
Diffstat (limited to 'deps')
-rw-r--r-- | deps/CMakeLists.txt | 10 | ||||
-rw-r--r-- | deps/acelite/ace/CMakeLists.txt | 4 | ||||
-rw-r--r-- | deps/bzip2/CMakeLists.txt | 4 | ||||
-rw-r--r-- | deps/fmt/CMakeLists.txt | 4 | ||||
-rw-r--r-- | deps/g3dlite/CMakeLists.txt | 2 | ||||
-rw-r--r-- | deps/gsoap/CMakeLists.txt | 10 | ||||
-rw-r--r-- | deps/jemalloc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | deps/libmpq/CMakeLists.txt | 2 | ||||
-rw-r--r-- | deps/recastnavigation/Detour/CMakeLists.txt | 2 | ||||
-rw-r--r-- | deps/recastnavigation/Recast/CMakeLists.txt | 2 | ||||
-rw-r--r-- | deps/zlib/CMakeLists.txt | 4 |
11 files changed, 35 insertions, 11 deletions
diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index d2f5b02949..6928eae287 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -1,3 +1,4 @@ +# # Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL3 v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3 # # This file is free software; as a special exception the author gives @@ -7,14 +8,7 @@ # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -if( MSVC ) - string(REGEX REPLACE "/W[0-4] " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - string(REGEX REPLACE "/W[0-4] " "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - add_definitions(/W0) -else() - add_definitions(-w) -endif() +# if(CMAKE_SYSTEM_NAME MATCHES "Windows") if(USE_MYSQL_SOURCES) diff --git a/deps/acelite/ace/CMakeLists.txt b/deps/acelite/ace/CMakeLists.txt index a7a5d5f32a..e795a2f675 100644 --- a/deps/acelite/ace/CMakeLists.txt +++ b/deps/acelite/ace/CMakeLists.txt @@ -348,6 +348,10 @@ if (MINGW) # GCC ignores "#prama comment" target_link_libraries(ace ws2_32 iphlpapi netapi32 mswsock) endif() +target_link_libraries(ace + PRIVATE + acore-dependency-interface) + # Generate precompiled header if(USE_COREPCH) add_cxx_pch(ace ${PRIVATE_PCH_HEADER}) diff --git a/deps/bzip2/CMakeLists.txt b/deps/bzip2/CMakeLists.txt index 5145066730..5370d99761 100644 --- a/deps/bzip2/CMakeLists.txt +++ b/deps/bzip2/CMakeLists.txt @@ -33,6 +33,10 @@ else() PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(bzip2 + PRIVATE + acore-dependency-interface) + set_target_properties(bzip2 PROPERTIES FOLDER diff --git a/deps/fmt/CMakeLists.txt b/deps/fmt/CMakeLists.txt index 6abe235ea5..ac59e55eca 100644 --- a/deps/fmt/CMakeLists.txt +++ b/deps/fmt/CMakeLists.txt @@ -67,6 +67,10 @@ target_include_directories(fmt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(fmt + PRIVATE + acore-dependency-interface) + set_target_properties(fmt PROPERTIES FOLDER diff --git a/deps/g3dlite/CMakeLists.txt b/deps/g3dlite/CMakeLists.txt index 5f6acc876d..8d18bda9b0 100644 --- a/deps/g3dlite/CMakeLists.txt +++ b/deps/g3dlite/CMakeLists.txt @@ -63,6 +63,8 @@ target_include_directories(g3dlib ${CMAKE_CURRENT_SOURCE_DIR}/include) target_link_libraries(g3dlib + PRIVATE + acore-dependency-interface PUBLIC zlib threads) diff --git a/deps/gsoap/CMakeLists.txt b/deps/gsoap/CMakeLists.txt index de731d9e81..a145e7f649 100644 --- a/deps/gsoap/CMakeLists.txt +++ b/deps/gsoap/CMakeLists.txt @@ -22,10 +22,14 @@ target_include_directories(gsoap PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(gsoap + PRIVATE + acore-dependency-interface) + set_target_properties(gsoap - PROPERTIES - FOLDER - "deps") + PROPERTIES + FOLDER + "deps") if (MSVC) # Little fix for MSVC / Windows platforms diff --git a/deps/jemalloc/CMakeLists.txt b/deps/jemalloc/CMakeLists.txt index 5011d454b0..fa2a51c0ec 100644 --- a/deps/jemalloc/CMakeLists.txt +++ b/deps/jemalloc/CMakeLists.txt @@ -85,6 +85,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND SERVERS AND NOT NOJEM) -D_REENTRAN) target_link_libraries(jemalloc + PRIVATE + acore-dependency-interface PUBLIC threads ${CMAKE_DL_LIBS}) diff --git a/deps/libmpq/CMakeLists.txt b/deps/libmpq/CMakeLists.txt index 0d5182217b..38dbcd32e1 100644 --- a/deps/libmpq/CMakeLists.txt +++ b/deps/libmpq/CMakeLists.txt @@ -29,6 +29,8 @@ target_include_directories(mpq ${CMAKE_SOURCE_DIR}/deps/bzip2) target_link_libraries(mpq + PRIVATE + acore-dependency-interface PUBLIC zlib bzip2) diff --git a/deps/recastnavigation/Detour/CMakeLists.txt b/deps/recastnavigation/Detour/CMakeLists.txt index 6b94b0ea8f..83399e8551 100644 --- a/deps/recastnavigation/Detour/CMakeLists.txt +++ b/deps/recastnavigation/Detour/CMakeLists.txt @@ -35,6 +35,8 @@ target_include_directories(Detour GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(Detour + PRIVATE + acore-dependency-interface PUBLIC zlib) diff --git a/deps/recastnavigation/Recast/CMakeLists.txt b/deps/recastnavigation/Recast/CMakeLists.txt index 5f574a485a..42d403adb7 100644 --- a/deps/recastnavigation/Recast/CMakeLists.txt +++ b/deps/recastnavigation/Recast/CMakeLists.txt @@ -39,6 +39,8 @@ target_include_directories(Recast ${CMAKE_CURRENT_SOURCE_DIR}/Include) target_link_libraries(Recast + PRIVATE + acore-dependency-interface PUBLIC zlib) diff --git a/deps/zlib/CMakeLists.txt b/deps/zlib/CMakeLists.txt index d75378a652..2b9638c2a0 100644 --- a/deps/zlib/CMakeLists.txt +++ b/deps/zlib/CMakeLists.txt @@ -47,6 +47,10 @@ else() PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(zlib + PRIVATE + acore-dependency-interface) + set_target_properties(zlib PROPERTIES FOLDER |