mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 18:13:48 +00:00
feat(Cmake): Rewrite build and use inherited dependencies (#1652)
This commit is contained in:
committed by
Francesco Borzì
parent
0f174eff01
commit
eae9affec9
62
deps/zlib/CMakeLists.txt
vendored
62
deps/zlib/CMakeLists.txt
vendored
@@ -1,4 +1,5 @@
|
||||
# Copyright (C)
|
||||
# Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
|
||||
# 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
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
@@ -8,23 +9,46 @@
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
SET(zlib_STAT_SRCS
|
||||
adler32.c
|
||||
compress.c
|
||||
crc32.c
|
||||
deflate.c
|
||||
example.c
|
||||
infback.c
|
||||
inffast.c
|
||||
inflate.c
|
||||
inftrees.c
|
||||
trees.c
|
||||
uncompr.c
|
||||
zutil.c
|
||||
)
|
||||
if(UNIX)
|
||||
# Look for an installed zlib on unix
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_library(zlib SHARED IMPORTED GLOBAL)
|
||||
|
||||
add_library(zlib STATIC ${zlib_STAT_SRCS})
|
||||
set_target_properties(zlib
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION
|
||||
"${ZLIB_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${ZLIB_INCLUDE_DIRS}")
|
||||
else()
|
||||
# Use the bundled source on windows
|
||||
SET(zlib_STAT_SRCS
|
||||
adler32.c
|
||||
compress.c
|
||||
crc32.c
|
||||
deflate.c
|
||||
infback.c
|
||||
inffast.c
|
||||
inflate.c
|
||||
inftrees.c
|
||||
trees.c
|
||||
uncompr.c
|
||||
zutil.c
|
||||
)
|
||||
|
||||
add_library(zlib STATIC
|
||||
${zlib_STAT_SRCS})
|
||||
|
||||
# Group sources
|
||||
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_include_directories(zlib
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set_target_properties(zlib
|
||||
PROPERTIES
|
||||
FOLDER
|
||||
"deps")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user