diff --git a/CMakeLists.txt b/CMakeLists.txt index ca2b3af6fe..90e34acc91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -308,6 +308,14 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") # Drop unreachable code and data. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip,-dead_strip_dylibs") + # Set -fno-objc-exceptions, for consistency with -fno-exceptions earlier. + # If we set only -fno-exceptions, fmt fails to compile when included from + # Objective-C++ because fmt tries try to use throw because __EXCEPTIONS is defined. + # + # TODO: Only enable this for Objective-C(++). + # We get warnings if we enable this when building regular C(++) code. + check_and_add_flag(NO_OBJC_EXCEPTIONS -fno-objc-exceptions) + find_library(APPKIT_LIBRARY AppKit) find_library(APPSERV_LIBRARY ApplicationServices) find_library(CARBON_LIBRARY Carbon) diff --git a/Source/Android/jni/AndroidCommon/CMakeLists.txt b/Source/Android/jni/AndroidCommon/CMakeLists.txt index e8bcc22863..c9c48e067a 100644 --- a/Source/Android/jni/AndroidCommon/CMakeLists.txt +++ b/Source/Android/jni/AndroidCommon/CMakeLists.txt @@ -8,6 +8,7 @@ add_library(androidcommon STATIC target_link_libraries(androidcommon PRIVATE android + common log "-Wl,--no-warn-mismatch" "-Wl,--whole-archive" diff --git a/Source/Android/jni/CMakeLists.txt b/Source/Android/jni/CMakeLists.txt index 2b8329f99a..7f31a144aa 100644 --- a/Source/Android/jni/CMakeLists.txt +++ b/Source/Android/jni/CMakeLists.txt @@ -10,6 +10,7 @@ add_library(main SHARED target_link_libraries(main PRIVATE androidcommon + common core uicommon ) diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index 908c60ed5e..1ee5e17ed4 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -75,4 +75,11 @@ if(WIN32) ) endif() -target_link_libraries(audiocommon PRIVATE cubeb SoundTouch FreeSurround) +target_link_libraries(audiocommon +PUBLIC + common + +PRIVATE + cubeb + SoundTouch + FreeSurround) diff --git a/Source/Core/DiscIO/CMakeLists.txt b/Source/Core/DiscIO/CMakeLists.txt index b3db39ce63..fcaede29b3 100644 --- a/Source/Core/DiscIO/CMakeLists.txt +++ b/Source/Core/DiscIO/CMakeLists.txt @@ -58,6 +58,7 @@ add_library(discio target_link_libraries(discio PUBLIC + common BZip2::BZip2 LibLZMA::LibLZMA zstd