aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-12-04 10:44:12 -0500
committerGitHub <noreply@github.com>2022-12-04 10:44:12 -0500
commit02b10a6e4dca0ed94e20e1b7dcc69a073d1f22a4 (patch)
tree25de4a77ee6f3f29e01470bf885b4fa58deb8323 /CMakeLists.txt
parentf77cc6c41272265b08247aa1e2614c050acccc67 (diff)
parent6d2c59737177dba09a0a2a31e96276addf52c172 (diff)
Merge pull request #9374 from liamwhite/externals
externals: update dynarmic, SDL2
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cdf63a030..facf4ea5f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,10 @@
cmake_minimum_required(VERSION 3.22)
+# Dynarmic has cmake_minimum_required(3.12) and we may want to override
+# some of its variables, which is only possible in 3.13+
+set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/find-modules")
@@ -71,7 +75,8 @@ if (YUZU_USE_PRECOMPILED_HEADERS)
# buildcache does not properly cache PCH files, leading to compilation errors.
# See https://github.com/mbitsnbites/buildcache/discussions/230
message(WARNING "buildcache does not properly support Precompiled Headers. Disabling PCH")
- set(YUZU_USE_PRECOMPILED_HEADERS OFF)
+ set(DYNARMIC_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
+ set(YUZU_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
endif()
endif()
if (YUZU_USE_PRECOMPILED_HEADERS)
@@ -444,7 +449,7 @@ if (TARGET Boost::boost)
endif()
# Ensure libusb is properly configured (based on dolphin libusb include)
-if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB)
+if(NOT YUZU_USE_BUNDLED_LIBUSB)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND AND NOT CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD")
pkg_check_modules(LIBUSB QUIET libusb-1.0>=1.0.24)
@@ -454,7 +459,8 @@ if(NOT APPLE AND NOT YUZU_USE_BUNDLED_LIBUSB)
if (LIBUSB_FOUND)
add_library(usb INTERFACE)
- target_include_directories(usb INTERFACE "${LIBUSB_INCLUDE_DIRS}")
+ target_include_directories(usb INTERFACE "${LIBUSB_INCLUDEDIR}" "${LIBUSB_INCLUDE_DIRS}")
+ target_link_directories(usb INTERFACE "${LIBUSB_LIBRARY_DIRS}")
target_link_libraries(usb INTERFACE "${LIBUSB_LIBRARIES}")
else()
message(WARNING "libusb not found, falling back to externals")