mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
feat(Cmake/Build): Use interface targets for inheriting flags and definitions (#2255)
Co-authored-by: Naios Naios@users.noreply.github.com
This commit is contained in:
10
deps/CMakeLists.txt
vendored
10
deps/CMakeLists.txt
vendored
@@ -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)
|
||||
|
||||
4
deps/acelite/ace/CMakeLists.txt
vendored
4
deps/acelite/ace/CMakeLists.txt
vendored
@@ -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})
|
||||
|
||||
4
deps/bzip2/CMakeLists.txt
vendored
4
deps/bzip2/CMakeLists.txt
vendored
@@ -33,6 +33,10 @@ else()
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(bzip2
|
||||
PRIVATE
|
||||
acore-dependency-interface)
|
||||
|
||||
set_target_properties(bzip2
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
|
||||
4
deps/fmt/CMakeLists.txt
vendored
4
deps/fmt/CMakeLists.txt
vendored
@@ -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
|
||||
|
||||
2
deps/g3dlite/CMakeLists.txt
vendored
2
deps/g3dlite/CMakeLists.txt
vendored
@@ -63,6 +63,8 @@ target_include_directories(g3dlib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
target_link_libraries(g3dlib
|
||||
PRIVATE
|
||||
acore-dependency-interface
|
||||
PUBLIC
|
||||
zlib
|
||||
threads)
|
||||
|
||||
10
deps/gsoap/CMakeLists.txt
vendored
10
deps/gsoap/CMakeLists.txt
vendored
@@ -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
|
||||
|
||||
2
deps/jemalloc/CMakeLists.txt
vendored
2
deps/jemalloc/CMakeLists.txt
vendored
@@ -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})
|
||||
|
||||
2
deps/libmpq/CMakeLists.txt
vendored
2
deps/libmpq/CMakeLists.txt
vendored
@@ -29,6 +29,8 @@ target_include_directories(mpq
|
||||
${CMAKE_SOURCE_DIR}/deps/bzip2)
|
||||
|
||||
target_link_libraries(mpq
|
||||
PRIVATE
|
||||
acore-dependency-interface
|
||||
PUBLIC
|
||||
zlib
|
||||
bzip2)
|
||||
|
||||
2
deps/recastnavigation/Detour/CMakeLists.txt
vendored
2
deps/recastnavigation/Detour/CMakeLists.txt
vendored
@@ -35,6 +35,8 @@ target_include_directories(Detour
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(Detour
|
||||
PRIVATE
|
||||
acore-dependency-interface
|
||||
PUBLIC
|
||||
zlib)
|
||||
|
||||
|
||||
2
deps/recastnavigation/Recast/CMakeLists.txt
vendored
2
deps/recastnavigation/Recast/CMakeLists.txt
vendored
@@ -39,6 +39,8 @@ target_include_directories(Recast
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||
|
||||
target_link_libraries(Recast
|
||||
PRIVATE
|
||||
acore-dependency-interface
|
||||
PUBLIC
|
||||
zlib)
|
||||
|
||||
|
||||
4
deps/zlib/CMakeLists.txt
vendored
4
deps/zlib/CMakeLists.txt
vendored
@@ -47,6 +47,10 @@ else()
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(zlib
|
||||
PRIVATE
|
||||
acore-dependency-interface)
|
||||
|
||||
set_target_properties(zlib
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
|
||||
Reference in New Issue
Block a user