From 89660f5beae0a3f307ac1587c016e93a4efaed63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Mon, 3 Aug 2026 18:50:13 +0200 Subject: [PATCH] CMake: Automatically disable warnings for Externals --- CMake/DolphinDisableWarnings.cmake | 17 +++++++++++ CMake/DolphinDisableWarningsMSVC.cmake | 20 ------------- CMake/DolphinLibraryTools.cmake | 30 ++++++++++++++++--- CMakeLists.txt | 37 +++++++++++------------- Externals/Bochs_disasm/CMakeLists.txt | 1 - Externals/FreeSurround/CMakeLists.txt | 1 - Externals/LZO/CMakeLists.txt | 1 - Externals/SDL/CMakeLists.txt | 7 ----- Externals/SFML/CMakeLists.txt | 2 -- Externals/bzip2/CMakeLists.txt | 1 - Externals/cpp-ipc/CMakeLists.txt | 1 - Externals/cpp-optparse/CMakeLists.txt | 1 - Externals/cubeb/CMakeLists.txt | 2 -- Externals/discord-rpc/src/CMakeLists.txt | 1 - Externals/ed25519/CMakeLists.txt | 1 - Externals/enet/CMakeLists.txt | 1 - Externals/fmt/CMakeLists.txt | 1 - Externals/glslang/CMakeLists.txt | 1 - Externals/hidapi/CMakeLists.txt | 1 - Externals/imgui/CMakeLists.txt | 1 - Externals/implot/CMakeLists.txt | 1 - Externals/libiconv/CMakeLists.txt | 1 - Externals/liblzma/CMakeLists.txt | 1 - Externals/libusb/CMakeLists.txt | 1 - Externals/lz4/CMakeLists.txt | 1 - Externals/mGBA/CMakeLists.txt | 1 - Externals/mbedtls/library/CMakeLists.txt | 6 ---- Externals/miniupnpc/CMakeLists.txt | 1 - Externals/minizip-ng/CMakeLists.txt | 1 - Externals/pugixml/CMakeLists.txt | 1 - Externals/rcheevos/CMakeLists.txt | 1 - Externals/spirv_cross/CMakeLists.txt | 1 - Externals/tinygltf/CMakeLists.txt | 1 - Externals/xxhash/CMakeLists.txt | 1 - Externals/zlib-ng/CMakeLists.txt | 1 - Externals/zstd/CMakeLists.txt | 1 - 36 files changed, 60 insertions(+), 89 deletions(-) create mode 100644 CMake/DolphinDisableWarnings.cmake delete mode 100644 CMake/DolphinDisableWarningsMSVC.cmake diff --git a/CMake/DolphinDisableWarnings.cmake b/CMake/DolphinDisableWarnings.cmake new file mode 100644 index 0000000000..72539ef10d --- /dev/null +++ b/CMake/DolphinDisableWarnings.cmake @@ -0,0 +1,17 @@ +function(dolphin_disable_warnings target) + get_target_property(target_flags ${target} COMPILE_OPTIONS) + set(new_flags) + foreach(flag IN LISTS target_flags) + # all warning flags start with "/W" or "/w" or "-W" or "-w" + if (NOT flag MATCHES "^[-/][Ww]") + list(APPEND new_flags "${flag}") + endif() + endforeach() + set_target_properties(${target} PROPERTIES COMPILE_OPTIONS "${new_flags}") + + if (MSVC) + target_compile_options(${target} PRIVATE "/W0") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") + target_compile_options(${target} PRIVATE "-w") + endif() +endfunction() diff --git a/CMake/DolphinDisableWarningsMSVC.cmake b/CMake/DolphinDisableWarningsMSVC.cmake deleted file mode 100644 index dbd3553762..0000000000 --- a/CMake/DolphinDisableWarningsMSVC.cmake +++ /dev/null @@ -1,20 +0,0 @@ -include(RemoveCompileFlag) - -macro(dolphin_disable_warnings _target) - get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS) - if (_target_cxx_flags) - set(new_flags "") - foreach(flag IN LISTS _target_cxx_flags) - # all warning flags start with "/W" or "/w" or "-W" or "-w" - if (NOT "${flag}" MATCHES "^[-/][Ww]") - list(APPEND new_flags "${flag}") - endif() - endforeach() - set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${new_flags}") - endif() - if (MSVC) - target_compile_options(${_target} PRIVATE "/W0") - elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") - target_compile_options(${_target} PRIVATE "-w") - endif() -endmacro() diff --git a/CMake/DolphinLibraryTools.cmake b/CMake/DolphinLibraryTools.cmake index 99f5f7f8f4..7b99dec1e3 100644 --- a/CMake/DolphinLibraryTools.cmake +++ b/CMake/DolphinLibraryTools.cmake @@ -41,8 +41,21 @@ function(dolphin_optional_system_library out_use_system library) endif() endfunction() -function(dolphin_add_bundled_library library use_system bundled_path) - if (${use_system} STREQUAL "AUTO") +function(dolphin_find_directory_targets dir result) + get_directory_property(targets DIRECTORY ${dir} BUILDSYSTEM_TARGETS) + + get_property(subdirs DIRECTORY ${dir} PROPERTY SUBDIRECTORIES) + foreach(subdir IN LISTS subdirs) + dolphin_find_directory_targets(${subdir} sub_targets) + list(APPEND targets ${sub_targets}) + endforeach() + + set(${result} "${targets}" PARENT_SCOPE) +endfunction() + +function(dolphin_add_bundled_library library bundled_path) + set(use_system "${ARGV2}") + if (use_system STREQUAL "AUTO") message(STATUS "No system ${library} was found. Using static ${library} from Externals.") else() message(STATUS "Using static ${library} from Externals") @@ -51,6 +64,15 @@ function(dolphin_add_bundled_library library use_system bundled_path) message(FATAL_ERROR "No bundled ${library} was found. Did you forget to checkout submodules?") endif() add_subdirectory(${bundled_path} EXCLUDE_FROM_ALL) + dolphin_find_directory_targets(${bundled_path} bundled_targets) + foreach(target IN LISTS bundled_targets) + get_target_property(type ${target} TYPE) + get_target_property(imported ${target} IMPORTED) + if(imported OR type STREQUAL "INTERFACE_LIBRARY" OR type STREQUAL "UTILITY") + continue() + endif() + dolphin_disable_warnings(${target}) + endforeach() endfunction() function(dolphin_set_library_type library type) @@ -119,7 +141,7 @@ function(dolphin_find_optional_system_library library bundled_path) message(STATUS "Using system ${library}") else() dolphin_set_library_type(${library} "Bundled") - dolphin_add_bundled_library(${library} ${use_system} ${bundled_path}) + dolphin_add_bundled_library(${library} ${bundled_path} ${use_system}) endif() endfunction() @@ -138,7 +160,7 @@ function(dolphin_find_optional_system_library_pkgconfig library search alias bun dolphin_alias_library(${alias} PkgConfig::${library}) else() dolphin_set_library_type(${library} "Bundled") - dolphin_add_bundled_library(${library} ${use_system} ${bundled_path}) + dolphin_add_bundled_library(${library} ${bundled_path} ${use_system}) endif() endfunction() diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f62d7f847..d442df80a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ include(CheckAndAddFlag) include(CheckCCompilerFlag) include(CheckSymbolExists) include(DolphinCompileDefinitions) -include(DolphinDisableWarningsMSVC) +include(DolphinDisableWarnings) include(DolphinLibraryTools) include(GNUInstallDirs) include(RemoveCompileFlag) @@ -608,36 +608,36 @@ endif() # Externals/zlib/CMakeLists.txt (that is: NOT in some Src/ subdirectory) # if (_M_X86_64) - add_subdirectory(Externals/Bochs_disasm) + dolphin_add_bundled_library(Bochs_disasm Externals/Bochs_disasm) endif() -add_subdirectory(Externals/cpp-optparse) +dolphin_add_bundled_library(cpp-optparse Externals/cpp-optparse) dolphin_find_optional_system_library_pkgconfig(FMT fmt>=10.1 fmt::fmt Externals/fmt ) -add_subdirectory(Externals/imgui) -add_subdirectory(Externals/implot) +dolphin_add_bundled_library(ImGui Externals/imgui) +dolphin_add_bundled_library(ImPlot Externals/implot) dolphin_find_optional_system_library(glslang Externals/glslang DOLPHIN_TRY_VERSIONS 15 16) # SPIRV-Cross is used on Windows for GLSL to HLSL conversion for the Direct3D 11 and Direct3D 12 # video backends, and on Apple devices for the Metal video backend. if(WIN32 OR APPLE) - add_subdirectory(Externals/spirv_cross) + dolphin_add_bundled_library(SPIRV-Cross Externals/spirv_cross) endif() -add_subdirectory(Externals/tinygltf) +dolphin_add_bundled_library(TinyGLTF Externals/tinygltf) if(ENABLE_VULKAN) add_definitions(-DHAS_VULKAN) if(APPLE AND USE_BUNDLED_MOLTENVK) - add_subdirectory(Externals/MoltenVK) + dolphin_add_bundled_library(MoltenVK Externals/MoltenVK) endif() if (ANDROID AND _M_ARM_64) - add_subdirectory(Externals/libadrenotools) + dolphin_add_bundled_library(libadrenotools Externals/libadrenotools) endif() endif() @@ -679,14 +679,12 @@ dolphin_find_optional_system_library_pkgconfig(lz4 liblz4>=1.8 LZ4::LZ4 External dolphin_find_optional_system_library_pkgconfig(SPNG spng spng::spng Externals/libspng) -# Using static FreeSurround from Externals # There is no system FreeSurround library. -message(STATUS "Using static FreeSurround from Externals") -add_subdirectory(Externals/FreeSurround) +dolphin_add_bundled_library(FreeSurround Externals/FreeSurround) if (APPLE OR WIN32) message(STATUS "Using ed25519 from Externals") - add_subdirectory(Externals/ed25519) + dolphin_add_bundled_library(ed25519 Externals/ed25519) include_directories(Externals/ed25519) endif() @@ -721,8 +719,7 @@ if(NOT ANDROID) endif() if(USE_DISCORD_PRESENCE) - message(STATUS "Using static DiscordRPC from Externals") - add_subdirectory(Externals/discord-rpc EXCLUDE_FROM_ALL) + dolphin_add_bundled_library(DiscordRPC Externals/discord-rpc) include_directories(Externals/discord-rpc/include) endif() @@ -745,19 +742,19 @@ endif() include_directories(Externals/picojson) -add_subdirectory(Externals/expr) +dolphin_add_bundled_library(expr Externals/expr) -add_subdirectory(Externals/FatFs) +dolphin_add_bundled_library(FatFs Externals/FatFs) if (USE_RETRO_ACHIEVEMENTS) - add_subdirectory(Externals/rcheevos) + dolphin_add_bundled_library(rcheevos Externals/rcheevos) endif() -add_subdirectory(Externals/watcher) +dolphin_add_bundled_library(watcher Externals/watcher) # Any other platform or BSD is currently unsupported by cpp-ipc if(WIN32 OR LINUX OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "QNX") - add_subdirectory(Externals/cpp-ipc) + dolphin_add_bundled_library(cpp-ipc Externals/cpp-ipc) add_definitions(-DHAVE_CPPIPC) endif() diff --git a/Externals/Bochs_disasm/CMakeLists.txt b/Externals/Bochs_disasm/CMakeLists.txt index cb78a826c7..84326842cb 100644 --- a/Externals/Bochs_disasm/CMakeLists.txt +++ b/Externals/Bochs_disasm/CMakeLists.txt @@ -4,7 +4,6 @@ add_library(bdisasm STATIC resolve.cc syntax.cc ) -dolphin_disable_warnings(bdisasm) if (WIN32) target_sources(bdisasm diff --git a/Externals/FreeSurround/CMakeLists.txt b/Externals/FreeSurround/CMakeLists.txt index 448842da2f..9a17fff2fd 100644 --- a/Externals/FreeSurround/CMakeLists.txt +++ b/Externals/FreeSurround/CMakeLists.txt @@ -12,6 +12,5 @@ set(SRCS ) add_library(FreeSurround STATIC ${SRCS}) -dolphin_disable_warnings(FreeSurround) target_include_directories(FreeSurround PUBLIC include) target_compile_options(FreeSurround PRIVATE -w) diff --git a/Externals/LZO/CMakeLists.txt b/Externals/LZO/CMakeLists.txt index 9f6669344e..c0250b726b 100644 --- a/Externals/LZO/CMakeLists.txt +++ b/Externals/LZO/CMakeLists.txt @@ -1,7 +1,6 @@ add_library(lzo2 STATIC minilzo.c ) -dolphin_disable_warnings(lzo2) target_include_directories(lzo2 PUBLIC diff --git a/Externals/SDL/CMakeLists.txt b/Externals/SDL/CMakeLists.txt index 6bdd630101..499adbf6a4 100644 --- a/Externals/SDL/CMakeLists.txt +++ b/Externals/SDL/CMakeLists.txt @@ -26,10 +26,3 @@ if(LibUSB_TYPE STREQUAL Bundled) endif() add_subdirectory(SDL) - -if (TARGET SDL3) - dolphin_disable_warnings(SDL3) -endif() -if (TARGET SDL3-static) - dolphin_disable_warnings(SDL3-static) -endif() diff --git a/Externals/SFML/CMakeLists.txt b/Externals/SFML/CMakeLists.txt index 7736feb12c..cb0c841493 100644 --- a/Externals/SFML/CMakeLists.txt +++ b/Externals/SFML/CMakeLists.txt @@ -30,5 +30,3 @@ target_compile_definitions(sfml-system PUBLIC SFML_STATIC) target_include_directories(sfml-system PUBLIC SFML/include PRIVATE SFML/src) target_include_directories(sfml-network PUBLIC SFML/include PRIVATE SFML/src) target_link_libraries(sfml-network PUBLIC sfml-system) -dolphin_disable_warnings(sfml-network) -dolphin_disable_warnings(sfml-system) diff --git a/Externals/bzip2/CMakeLists.txt b/Externals/bzip2/CMakeLists.txt index 94bbc3bcba..52c5d1f815 100644 --- a/Externals/bzip2/CMakeLists.txt +++ b/Externals/bzip2/CMakeLists.txt @@ -71,7 +71,6 @@ set(BZIP2_SRCS add_library(bzip2 STATIC ${BZIP2_SRCS} ${BZIP2_PUBLIC_HDRS} ${BZIP2_PRIVATE_HDRS}) add_library(BZip2::BZip2 ALIAS bzip2) -dolphin_disable_warnings(bzip2) target_include_directories(bzip2 PUBLIC diff --git a/Externals/cpp-ipc/CMakeLists.txt b/Externals/cpp-ipc/CMakeLists.txt index c8b52f420d..dadbd35456 100644 --- a/Externals/cpp-ipc/CMakeLists.txt +++ b/Externals/cpp-ipc/CMakeLists.txt @@ -1,6 +1,5 @@ add_subdirectory(cpp-ipc EXCLUDE_FROM_ALL) -dolphin_disable_warnings(ipc) if (NOT MSVC) target_compile_options(ipc PRIVATE "-fexceptions") diff --git a/Externals/cpp-optparse/CMakeLists.txt b/Externals/cpp-optparse/CMakeLists.txt index 1d255582f7..1ff1b8a6b0 100644 --- a/Externals/cpp-optparse/CMakeLists.txt +++ b/Externals/cpp-optparse/CMakeLists.txt @@ -6,7 +6,6 @@ set(SRCS add_library(cpp-optparse STATIC ${SRCS}) target_compile_features(cpp-optparse PUBLIC cxx_std_11) target_compile_options(cpp-optparse PRIVATE -fexceptions) -dolphin_disable_warnings(cpp-optparse) target_include_directories(cpp-optparse PUBLIC diff --git a/Externals/cubeb/CMakeLists.txt b/Externals/cubeb/CMakeLists.txt index 1cce7d18ab..1925732ac3 100644 --- a/Externals/cubeb/CMakeLists.txt +++ b/Externals/cubeb/CMakeLists.txt @@ -69,7 +69,6 @@ add_library(cubeb cubeb/src/cubeb_strings.c cubeb/src/cubeb_utils.cpp ) -dolphin_disable_warnings(cubeb) target_include_directories(cubeb PUBLIC $ $ ) @@ -127,7 +126,6 @@ endif() if(NOT TARGET speex) add_library(speex OBJECT cubeb/subprojects/speex/resample.c) - dolphin_disable_warnings(speex) set_target_properties(speex PROPERTIES POSITION_INDEPENDENT_CODE TRUE) target_include_directories(speex INTERFACE cubeb/subprojects) target_compile_definitions(speex PUBLIC diff --git a/Externals/discord-rpc/src/CMakeLists.txt b/Externals/discord-rpc/src/CMakeLists.txt index 2e8b9f6c3d..c49b26faf6 100644 --- a/Externals/discord-rpc/src/CMakeLists.txt +++ b/Externals/discord-rpc/src/CMakeLists.txt @@ -31,7 +31,6 @@ if(WIN32) add_definitions(-DDISCORD_WINDOWS) set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp) add_library(discord-rpc ${BASE_RPC_SRC}) - dolphin_disable_warnings(discord-rpc) if (MSVC) if(USE_STATIC_CRT) foreach(CompilerFlag diff --git a/Externals/ed25519/CMakeLists.txt b/Externals/ed25519/CMakeLists.txt index eeea8cca26..a3a68d536f 100644 --- a/Externals/ed25519/CMakeLists.txt +++ b/Externals/ed25519/CMakeLists.txt @@ -11,4 +11,3 @@ add_library(ed25519 sc.c sha512.c verify.c) -dolphin_disable_warnings(ed25519) diff --git a/Externals/enet/CMakeLists.txt b/Externals/enet/CMakeLists.txt index 04b4398204..8a06ad569f 100644 --- a/Externals/enet/CMakeLists.txt +++ b/Externals/enet/CMakeLists.txt @@ -1,5 +1,4 @@ add_subdirectory(enet) -dolphin_disable_warnings(enet) add_library(enet::enet ALIAS enet) target_include_directories(enet PUBLIC enet/include) diff --git a/Externals/fmt/CMakeLists.txt b/Externals/fmt/CMakeLists.txt index 6c3ae26666..468fe7de6b 100755 --- a/Externals/fmt/CMakeLists.txt +++ b/Externals/fmt/CMakeLists.txt @@ -1,2 +1 @@ add_subdirectory(fmt) -dolphin_disable_warnings(fmt) diff --git a/Externals/glslang/CMakeLists.txt b/Externals/glslang/CMakeLists.txt index b3e311560d..23e9aa6b11 100644 --- a/Externals/glslang/CMakeLists.txt +++ b/Externals/glslang/CMakeLists.txt @@ -17,5 +17,4 @@ if (TARGET glslang) PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" ) - dolphin_disable_warnings(glslang) endif() diff --git a/Externals/hidapi/CMakeLists.txt b/Externals/hidapi/CMakeLists.txt index df41e10c6d..717913a709 100644 --- a/Externals/hidapi/CMakeLists.txt +++ b/Externals/hidapi/CMakeLists.txt @@ -1,7 +1,6 @@ project(hidapi) add_library(hidapi STATIC hidapi-src/hidapi/hidapi.h) -dolphin_disable_warnings(hidapi) target_include_directories(hidapi PUBLIC hidapi-src/hidapi) if(APPLE) diff --git a/Externals/imgui/CMakeLists.txt b/Externals/imgui/CMakeLists.txt index 4dd9579eb3..e056e374a1 100644 --- a/Externals/imgui/CMakeLists.txt +++ b/Externals/imgui/CMakeLists.txt @@ -13,7 +13,6 @@ set(SRCS ) add_library(imgui STATIC ${SRCS}) -dolphin_disable_warnings(imgui) target_include_directories(imgui PUBLIC diff --git a/Externals/implot/CMakeLists.txt b/Externals/implot/CMakeLists.txt index 6ee7a386a8..6bd593f8c9 100644 --- a/Externals/implot/CMakeLists.txt +++ b/Externals/implot/CMakeLists.txt @@ -10,7 +10,6 @@ set(SRCS ) add_library(implot STATIC ${SRCS}) -dolphin_disable_warnings(implot) target_include_directories(implot PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/implot" PRIVATE imgui diff --git a/Externals/libiconv/CMakeLists.txt b/Externals/libiconv/CMakeLists.txt index 8e90d1ea49..902bddc35c 100644 --- a/Externals/libiconv/CMakeLists.txt +++ b/Externals/libiconv/CMakeLists.txt @@ -13,5 +13,4 @@ target_include_directories(iconv $ ) -dolphin_disable_warnings(iconv) add_library(Iconv::Iconv ALIAS iconv) diff --git a/Externals/liblzma/CMakeLists.txt b/Externals/liblzma/CMakeLists.txt index 8afaa1e81c..a451bb6d82 100644 --- a/Externals/liblzma/CMakeLists.txt +++ b/Externals/liblzma/CMakeLists.txt @@ -206,7 +206,6 @@ set(LZMA_SRCS add_library(lzma STATIC ${LZMA_SRCS} ${LZMA_PUBLIC_HDRS}) add_library(LibLZMA::LibLZMA ALIAS lzma) -dolphin_disable_warnings(lzma) target_compile_definitions(lzma PUBLIC LZMA_API_STATIC) diff --git a/Externals/libusb/CMakeLists.txt b/Externals/libusb/CMakeLists.txt index ffd6d42781..c5325bf517 100644 --- a/Externals/libusb/CMakeLists.txt +++ b/Externals/libusb/CMakeLists.txt @@ -6,7 +6,6 @@ add_library(usb STATIC EXCLUDE_FROM_ALL libusb/libusb/strerror.c libusb/libusb/sync.c ) -dolphin_disable_warnings(usb) set_target_properties(usb PROPERTIES VERSION 1.0.26) if(WIN32) diff --git a/Externals/lz4/CMakeLists.txt b/Externals/lz4/CMakeLists.txt index b1ee41c586..593f1d8d3a 100644 --- a/Externals/lz4/CMakeLists.txt +++ b/Externals/lz4/CMakeLists.txt @@ -8,6 +8,5 @@ set(LZ4_BUNDLED_MODE ON) add_subdirectory(lz4/build/cmake) -dolphin_disable_warnings(lz4_static) add_library(LZ4::LZ4 ALIAS lz4_static) target_compile_definitions(lz4_static PRIVATE XXH_NAMESPACE=LZ4_) diff --git a/Externals/mGBA/CMakeLists.txt b/Externals/mGBA/CMakeLists.txt index 61736a02f1..ad8982740f 100644 --- a/Externals/mGBA/CMakeLists.txt +++ b/Externals/mGBA/CMakeLists.txt @@ -1,7 +1,6 @@ set(LIBMGBA_ONLY ON) set(USE_LZMA ON) add_subdirectory(mgba EXCLUDE_FROM_ALL) -dolphin_disable_warnings(mgba) target_compile_definitions(mgba PUBLIC HAVE_CRC32 ENABLE_VFS ENABLE_DIRECTORIES) target_link_libraries(mgba ZLIB::ZLIB) diff --git a/Externals/mbedtls/library/CMakeLists.txt b/Externals/mbedtls/library/CMakeLists.txt index 8aa6efd47b..51f653540a 100644 --- a/Externals/mbedtls/library/CMakeLists.txt +++ b/Externals/mbedtls/library/CMakeLists.txt @@ -189,34 +189,28 @@ endif() if(USE_STATIC_MBEDTLS_LIBRARY) add_library(${mbedcrypto_static_target} STATIC ${src_crypto}) - dolphin_disable_warnings(${mbedcrypto_static_target}) set_target_properties(${mbedcrypto_static_target} PROPERTIES OUTPUT_NAME mbedcrypto) target_link_libraries(${mbedcrypto_static_target} PUBLIC ${libs}) add_library(${mbedx509_static_target} STATIC ${src_x509}) - dolphin_disable_warnings(${mbedx509_static_target}) set_target_properties(${mbedx509_static_target} PROPERTIES OUTPUT_NAME mbedx509) target_link_libraries(${mbedx509_static_target} PUBLIC ${libs} ${mbedcrypto_static_target}) add_library(${mbedtls_static_target} STATIC ${src_tls}) - dolphin_disable_warnings(${mbedtls_static_target}) set_target_properties(${mbedtls_static_target} PROPERTIES OUTPUT_NAME mbedtls) target_link_libraries(${mbedtls_static_target} PUBLIC ${libs} ${mbedx509_static_target}) endif(USE_STATIC_MBEDTLS_LIBRARY) if(USE_SHARED_MBEDTLS_LIBRARY) add_library(${mbedcrypto_target} SHARED ${src_crypto}) - dolphin_disable_warnings(${mbedcrypto_target}) set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 2.28.0 SOVERSION 7) target_link_libraries(${mbedcrypto_target} PUBLIC ${libs}) add_library(${mbedx509_target} SHARED ${src_x509}) - dolphin_disable_warnings(${mbedx509_target}) set_target_properties(${mbedx509_target} PROPERTIES VERSION 2.28.0 SOVERSION 1) target_link_libraries(${mbedx509_target} PUBLIC ${libs} ${mbedcrypto_target}) add_library(${mbedtls_target} SHARED ${src_tls}) - dolphin_disable_warnings(${mbedtls_target}) set_target_properties(${mbedtls_target} PROPERTIES VERSION 2.28.0 SOVERSION 14) target_link_libraries(${mbedtls_target} PUBLIC ${libs} ${mbedx509_target}) endif(USE_SHARED_MBEDTLS_LIBRARY) diff --git a/Externals/miniupnpc/CMakeLists.txt b/Externals/miniupnpc/CMakeLists.txt index 33f34fb7a8..3b931bd7e3 100644 --- a/Externals/miniupnpc/CMakeLists.txt +++ b/Externals/miniupnpc/CMakeLists.txt @@ -5,6 +5,5 @@ set(UPNPC_BUILD_SAMPLE OFF) set(UPNPC_NO_INSTALL ON) add_subdirectory(miniupnp/miniupnpc) -dolphin_disable_warnings(libminiupnpc-static) add_library(Miniupnpc::miniupnpc ALIAS libminiupnpc-static) diff --git a/Externals/minizip-ng/CMakeLists.txt b/Externals/minizip-ng/CMakeLists.txt index 8ad7f98259..0735bfc4e8 100644 --- a/Externals/minizip-ng/CMakeLists.txt +++ b/Externals/minizip-ng/CMakeLists.txt @@ -41,4 +41,3 @@ set(CMAKE_DISABLE_FIND_PACKAGE_PkgConfig TRUE) set(PKGCONFIG_FOUND FALSE) add_subdirectory(minizip-ng) -dolphin_disable_warnings(minizip-ng) diff --git a/Externals/pugixml/CMakeLists.txt b/Externals/pugixml/CMakeLists.txt index b2ff0ab1b1..70ab0a18ec 100644 --- a/Externals/pugixml/CMakeLists.txt +++ b/Externals/pugixml/CMakeLists.txt @@ -4,4 +4,3 @@ set(PUGIXML_BUILD_DEFINES OFF) set(PUGIXML_INSTALL OFF) add_subdirectory(pugixml) -dolphin_disable_warnings(pugixml-static) diff --git a/Externals/rcheevos/CMakeLists.txt b/Externals/rcheevos/CMakeLists.txt index dd75487339..3b5aa4f64e 100644 --- a/Externals/rcheevos/CMakeLists.txt +++ b/Externals/rcheevos/CMakeLists.txt @@ -57,7 +57,6 @@ add_library(rcheevos rcheevos/src/rc_version.c rcheevos/src/rc_version.h ) -dolphin_disable_warnings(rcheevos) target_include_directories(rcheevos PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/rcheevos/include") target_include_directories(rcheevos INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/Externals/spirv_cross/CMakeLists.txt b/Externals/spirv_cross/CMakeLists.txt index 2b9461dc07..0f8cd99b9f 100644 --- a/Externals/spirv_cross/CMakeLists.txt +++ b/Externals/spirv_cross/CMakeLists.txt @@ -47,7 +47,6 @@ endif() endif() add_library(spirv_cross STATIC ${SRCS}) -dolphin_disable_warnings(spirv_cross) target_compile_definitions(spirv_cross PUBLIC SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS) target_include_directories(spirv_cross PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Cross/include ${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Cross) diff --git a/Externals/tinygltf/CMakeLists.txt b/Externals/tinygltf/CMakeLists.txt index b11ac09b68..d72561acf5 100644 --- a/Externals/tinygltf/CMakeLists.txt +++ b/Externals/tinygltf/CMakeLists.txt @@ -8,4 +8,3 @@ endif() target_sources(tinygltf PRIVATE tinygltf/tiny_gltf.cc) target_include_directories(tinygltf INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) -dolphin_disable_warnings(tinygltf) diff --git a/Externals/xxhash/CMakeLists.txt b/Externals/xxhash/CMakeLists.txt index a874dc4e90..b16b5fe7e6 100644 --- a/Externals/xxhash/CMakeLists.txt +++ b/Externals/xxhash/CMakeLists.txt @@ -1,7 +1,6 @@ project(xxhash C) add_library(xxhash STATIC xxHash/xxhash.c) -dolphin_disable_warnings(xxhash) target_include_directories(xxhash PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/xxHash diff --git a/Externals/zlib-ng/CMakeLists.txt b/Externals/zlib-ng/CMakeLists.txt index 2b686c0b12..4d3fac33b9 100644 --- a/Externals/zlib-ng/CMakeLists.txt +++ b/Externals/zlib-ng/CMakeLists.txt @@ -12,4 +12,3 @@ set(ZLIB_LIBRARY ZLIB::ZLIB CACHE STRING "Path to zlib library") # Setup zlib alias project so FindZLIB doesn't recreate it add_library(ZLIB::ZLIB ALIAS zlib) -dolphin_disable_warnings(zlib) diff --git a/Externals/zstd/CMakeLists.txt b/Externals/zstd/CMakeLists.txt index d83ce4cb1f..a33f2a8070 100644 --- a/Externals/zstd/CMakeLists.txt +++ b/Externals/zstd/CMakeLists.txt @@ -6,5 +6,4 @@ set(ZSTD_BUILD_SHARED OFF) add_subdirectory(zstd EXCLUDE_FROM_ALL) -dolphin_disable_warnings(libzstd_static) add_library(zstd::zstd ALIAS libzstd_static)