mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 07:09:03 +00:00
Merge pull request #6639 from lioncash/zlib
CMakeLists: Link zlib in privately where applicable, and don't dump its includes into the top-level directory
This commit is contained in:
commit
b84806ed8d
4 changed files with 12 additions and 3 deletions
|
@ -572,11 +572,9 @@ endif()
|
||||||
find_package(ZLIB)
|
find_package(ZLIB)
|
||||||
if(ZLIB_FOUND)
|
if(ZLIB_FOUND)
|
||||||
message(STATUS "Using shared zlib")
|
message(STATUS "Using shared zlib")
|
||||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "Shared zlib not found, falling back to the static library")
|
message(STATUS "Shared zlib not found, falling back to the static library")
|
||||||
add_subdirectory(Externals/zlib)
|
add_subdirectory(Externals/zlib)
|
||||||
include_directories(Externals/zlib)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
|
|
6
Externals/zlib/CMakeLists.txt
vendored
6
Externals/zlib/CMakeLists.txt
vendored
|
@ -77,3 +77,9 @@ set(ZLIB_SRCS
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(z STATIC ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
add_library(z STATIC ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||||
|
add_library(ZLIB::ZLIB ALIAS z)
|
||||||
|
|
||||||
|
target_include_directories(z
|
||||||
|
PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
|
@ -288,11 +288,11 @@ PUBLIC
|
||||||
videonull
|
videonull
|
||||||
videoogl
|
videoogl
|
||||||
videosoftware
|
videosoftware
|
||||||
z
|
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
bdisasm
|
bdisasm
|
||||||
${LZO}
|
${LZO}
|
||||||
|
ZLIB::ZLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
@ -21,3 +21,8 @@ add_library(discio
|
||||||
WiiSaveBanner.cpp
|
WiiSaveBanner.cpp
|
||||||
WiiWad.cpp
|
WiiWad.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_libraries(discio
|
||||||
|
PRIVATE
|
||||||
|
ZLIB::ZLIB
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue