summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
1 files changed, 19 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd40e5cfe..ce46a2c2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,8 +118,17 @@ message(STATUS "Target architecture: ${ARCHITECTURE}")
# Configure C++ standard
# ===========================
-set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
+# boost asio's concept usage doesn't play nicely with some compilers yet.
+add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS)
+if (MSVC)
+ add_compile_options(/std:c++latest)
+
+ # cubeb and boost still make use of deprecated result_of.
+ add_definitions(-D_HAS_DEPRECATED_RESULT_OF)
+else()
+ set(CMAKE_CXX_STANDARD 20)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+endif()
# Output binaries to bin/
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
@@ -151,7 +160,7 @@ macro(yuzu_find_packages)
# Cmake Pkg Prefix Version Conan Pkg
"Boost 1.71 boost/1.72.0"
"Catch2 2.11 catch2/2.11.0"
- "fmt 6.2 fmt/6.2.0"
+ "fmt 7.0 fmt/7.0.1"
# can't use until https://github.com/bincrafters/community/issues/1173
#"libzip 1.5 libzip/1.5.2@bincrafters/stable"
"lz4 1.8 lz4/1.9.2"
@@ -211,7 +220,7 @@ if(ENABLE_QT)
set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
endif()
- find_package(Qt5 5.9 COMPONENTS Widgets OpenGL ${QT_PREFIX_HINT})
+ find_package(Qt5 5.9 COMPONENTS Widgets ${QT_PREFIX_HINT})
if (YUZU_USE_QT_WEB_ENGINE)
find_package(Qt5 COMPONENTS WebEngineCore WebEngineWidgets)
endif()
@@ -287,7 +296,7 @@ if (CONAN_REQUIRED_LIBS)
if(ENABLE_QT)
list(APPEND CMAKE_MODULE_PATH "${CONAN_QT_ROOT_RELEASE}")
list(APPEND CMAKE_PREFIX_PATH "${CONAN_QT_ROOT_RELEASE}")
- find_package(Qt5 5.9 REQUIRED COMPONENTS Widgets OpenGL)
+ find_package(Qt5 5.9 REQUIRED COMPONENTS Widgets)
if (YUZU_USE_QT_WEB_ENGINE)
find_package(Qt5 REQUIRED COMPONENTS WebEngineCore WebEngineWidgets)
endif()
@@ -330,13 +339,16 @@ elseif(SDL2_FOUND)
endif()
# Ensure libusb is properly configured (based on dolphin libusb include)
-find_package(LibUSB)
+if(NOT APPLE)
+ include(FindPkgConfig)
+ find_package(LibUSB)
+endif()
if (NOT LIBUSB_FOUND)
add_subdirectory(externals/libusb)
+ set(LIBUSB_INCLUDE_DIR "")
set(LIBUSB_LIBRARIES usb)
endif()
-
# Prefer the -pthread flag on Linux.
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)