mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-18 11:23:38 +00:00
minizip-ng: Properly use libraries from Externals
This also fixes the CMake build on Windows, since it would fail to find our target defined in Externals and would fall back to trying to redefine it, which produces an error.
This commit is contained in:
parent
11065e9911
commit
4af06fd487
@ -658,6 +658,13 @@ if(NOT (WIN32 AND _M_ARM_64))
|
||||
add_definitions(-DHAS_OPENGL)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
if(ANDROID)
|
||||
set(USE_SYSTEM_Iconv OFF)
|
||||
endif()
|
||||
dolphin_find_optional_system_library(Iconv Externals/libiconv 1.14)
|
||||
endif()
|
||||
|
||||
dolphin_find_optional_system_library(pugixml Externals/pugixml)
|
||||
|
||||
dolphin_find_optional_system_library_pkgconfig(ENET libenet>=1.3.18 enet::enet Externals/enet)
|
||||
@ -718,15 +725,6 @@ dolphin_find_optional_system_library(MBEDTLS Externals/mbedtls 2.28)
|
||||
|
||||
dolphin_find_optional_system_library(CURL Externals/curl)
|
||||
|
||||
if(NOT WIN32)
|
||||
if(NOT ANDROID)
|
||||
dolphin_find_optional_system_library(Iconv Externals/libiconv 1.14)
|
||||
else()
|
||||
message(STATUS "Using static iconv from Externals")
|
||||
add_subdirectory(Externals/libiconv EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
dolphin_find_optional_system_library(HIDAPI Externals/hidapi)
|
||||
endif()
|
||||
|
||||
35
Externals/minizip-ng/CMakeLists.txt
vendored
35
Externals/minizip-ng/CMakeLists.txt
vendored
@ -3,7 +3,42 @@ set(MZ_BUILD_TESTS OFF)
|
||||
set(MZ_BUILD_UNIT_TESTS OFF)
|
||||
set(MZ_BUILD_FUZZ_TESTS OFF)
|
||||
set(MZ_CODE_COVERAGE OFF)
|
||||
set(MZ_FETCH_LIBS OFF)
|
||||
set(MZ_BZIP2 OFF)
|
||||
set(MZ_PKCRYPT OFF)
|
||||
set(MZ_WZAES OFF)
|
||||
set(MZ_OPENSSL OFF)
|
||||
set(MZ_LIBBSD OFF)
|
||||
set(SKIP_INSTALL_ALL ON)
|
||||
|
||||
if(Iconv_TYPE STREQUAL Bundled)
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_Iconv TRUE)
|
||||
set(Iconv_FOUND TRUE)
|
||||
set(Iconv_LIBRARIES Iconv::Iconv)
|
||||
get_target_property(Iconv_INCLUDE_DIRS ${Iconv_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
if(LibLZMA_TYPE STREQUAL Bundled)
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_LibLZMA TRUE)
|
||||
set(LIBLZMA_FOUND TRUE)
|
||||
set(LIBLZMA_LIBRARIES LibLZMA::LibLZMA)
|
||||
get_target_property(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
if(ZLIB_TYPE STREQUAL Bundled)
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB TRUE)
|
||||
set(ZLIB_FOUND TRUE)
|
||||
set(ZLIB_LIBRARIES ZLIB::ZLIB)
|
||||
get_target_property(ZLIB_INCLUDE_DIRS ${ZLIB_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
if(ZSTD_TYPE STREQUAL Bundled)
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_ZSTD TRUE)
|
||||
set(ZSTD_FOUND TRUE)
|
||||
set(ZSTD_LIBRARIES zstd::zstd)
|
||||
get_target_property(ZSTD_INCLUDE_DIRS ${ZSTD_LIBRARIES} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
|
||||
# minizip-ng otherwise uses system libraries when we provide them above
|
||||
set(CMAKE_DISABLE_FIND_PACKAGE_PkgConfig TRUE)
|
||||
set(PKGCONFIG_FOUND FALSE)
|
||||
|
||||
add_subdirectory(minizip-ng)
|
||||
dolphin_disable_warnings(minizip-ng)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user