@@ -24,7 +24,7 @@ endif()
2424
2525# Minimum OS X version.
2626# This is inserted into the Info.plist as well.
27- set (CMAKE_OSX_DEPLOYMENT_TARGET "10.15 .0" CACHE STRING "" )
27+ set (CMAKE_OSX_DEPLOYMENT_TARGET "11.0 .0" CACHE STRING "" )
2828
2929set (CMAKE_USER_MAKE_RULES_OVERRIDE "${CMAKE_CURRENT_SOURCE_DIR} /CMake/FlagsOverride.cmake" )
3030
@@ -44,7 +44,7 @@ endif()
4444
4545set (COMPILER ${CMAKE_CXX_COMPILER_ID} )
4646if (COMPILER STREQUAL "GNU" )
47- set (COMPILER "GCC" ) # perfer printing GCC instead of GNU
47+ set (COMPILER "GCC" ) # prefer printing GCC instead of GNU
4848endif ()
4949
5050# Enforce minimum compiler versions that support the c++20 features we use
@@ -98,6 +98,7 @@ option(ENABLE_GENERIC "Enables generic build that should run on any little-endia
9898option (ENABLE_HEADLESS "Enables running Dolphin as a headless variant" OFF )
9999option (ENABLE_ALSA "Enables ALSA sound backend" ON )
100100option (ENABLE_PULSEAUDIO "Enables PulseAudio sound backend" ON )
101+ option (ENABLE_CUBEB "Enables Cubeb sound backend" ON )
101102option (ENABLE_LLVM "Enables LLVM support, for disassembly" ON )
102103option (ENABLE_TESTS "Enables building the unit tests" ON )
103104option (ENABLE_VULKAN "Enables vulkan video backend" ON )
@@ -123,6 +124,11 @@ option(OPROFILING "Enable profiling" OFF)
123124# TODO: Add DSPSpy
124125option (DSPTOOL "Build dsptool" OFF )
125126
127+ # RetroAchievements developer tools require Windows hooks
128+ if (WIN32 )
129+ option (RC_CLIENT_SUPPORTS_RAINTEGRATION "Enables RetroAchievements developer tools" ON )
130+ endif ()
131+
126132# Enable SDL by default on operating systems that aren't Android.
127133if (NOT ANDROID)
128134 option (ENABLE_SDL "Enables SDL as a generic controller backend" ON )
@@ -143,6 +149,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
143149 option (ENABLE_VTUNE "Enable Intel VTune integration for JIT code." OFF )
144150
145151 if (NOT ANDROID)
152+ option (ENABLE_HWDB "Enables the udev hardware database" ON )
146153 option (ENABLE_EVDEV "Enables the evdev controller backend" ON )
147154 endif ()
148155endif ()
@@ -406,7 +413,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
406413 set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib" )
407414
408415 if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
409- # Workaround: the llvm libc++ and versions of clang eariler than 14 have a bug with consteval
416+ # Workaround: the llvm libc++ and versions of clang earlier than 14 have a bug with consteval
410417 # so we define FMT_CONSTEVAL to blank to just disable consteval in fmt
411418 add_definitions (-DFMT_CONSTEVAL=)
412419 endif ()
@@ -565,6 +572,16 @@ if(OPROFILING)
565572 endif ()
566573endif ()
567574
575+ if (ENABLE_HWDB)
576+ find_package (LIBUDEV REQUIRED)
577+ if (LIBUDEV_FOUND)
578+ message (STATUS "libudev found, enabling hardware database" )
579+ add_definitions (-DHAVE_LIBUDEV=1)
580+ else ()
581+ message (FATAL_ERROR "Couldn't find libudev. Can't build hardware database.\n Disable ENABLE_HWDB if you wish to build without hardware database support" )
582+ endif ()
583+ endif ()
584+
568585if (ENABLE_EVDEV)
569586 find_package (LIBUDEV REQUIRED)
570587 find_package (LIBEVDEV REQUIRED)
@@ -672,7 +689,7 @@ dolphin_make_imported_target_if_missing(LibLZMA::LibLZMA LIBLZMA)
672689
673690dolphin_find_optional_system_library_pkgconfig(ZSTD libzstd>=1.4.0 zstd::zstd Externals/zstd)
674691
675- add_subdirectory ( Externals/zlib-ng)
692+ dolphin_find_optional_system_library_pkgconfig(ZLIB zlib>=1.3.1 ZLIB::ZLIB Externals/zlib-ng)
676693
677694dolphin_find_optional_system_library_pkgconfig(MINIZIP
678695 "minizip>=4.0.4" minizip::minizip Externals/minizip-ng
@@ -695,12 +712,10 @@ if (APPLE OR WIN32)
695712 include_directories (Externals/ed25519)
696713endif ()
697714
698- # Using static soundtouch from Externals
699- # Unable to use system soundtouch library: We require shorts, not floats.
700- add_subdirectory (Externals/soundtouch)
701- include_directories (Externals/soundtouch)
702-
703- dolphin_find_optional_system_library(CUBEB Externals/cubeb)
715+ if (ENABLE_CUBEB)
716+ dolphin_find_optional_system_library(CUBEB Externals/cubeb)
717+ add_definitions (-DHAVE_CUBEB)
718+ endif ()
704719
705720if (NOT ANDROID)
706721 dolphin_find_optional_system_library_pkgconfig(
@@ -709,7 +724,7 @@ if(NOT ANDROID)
709724 add_definitions (-D__LIBUSB__)
710725endif ()
711726
712- dolphin_find_optional_system_library(SFML Externals/SFML 2.1 COMPONENTS network system )
727+ dolphin_find_optional_system_library(SFML Externals/SFML 3.0 COMPONENTS Network System )
713728
714729if (USE_UPNP)
715730 dolphin_find_optional_system_library(MINIUPNPC Externals/miniupnpc 1.6)
@@ -783,14 +798,16 @@ if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h)
783798endif ()
784799
785800if (APPLE )
786- file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/DolphinQt )
787- if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/DolphinQt/Info .plist)
788- file (TOUCH ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/DolphinQt/Info .plist)
801+ file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /Source /Core)
802+ if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/VersionInfo .plist)
803+ file (TOUCH ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/VersionInfo .plist)
789804 endif ()
805+ endif ()
790806
791- file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/MacUpdater)
792- if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/MacUpdater/Info.plist)
793- file (TOUCH ${CMAKE_CURRENT_BINARY_DIR} /Source /Core/MacUpdater/Info.plist)
807+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
808+ file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /Flatpak)
809+ if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR} /Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml)
810+ file (TOUCH ${CMAKE_CURRENT_BINARY_DIR} /Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml)
794811 endif ()
795812endif ()
796813
@@ -801,7 +818,7 @@ endif()
801818add_custom_target (
802819 dolphin_scmrev
803820 ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DPROJECT_BINARY_DIR =${PROJECT_BINARY_DIR} -DDISTRIBUTOR=${DISTRIBUTOR} -DDOLPHIN_DEFAULT_UPDATE_TRACK=${DOLPHIN_DEFAULT_UPDATE_TRACK} -DGIT_FOUND=${GIT_FOUND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DDOLPHIN_WC_REVISION=${DOLPHIN_WC_REVISION} -DDOLPHIN_WC_DESCRIBE=${DOLPHIN_WC_DESCRIBE} -DDOLPHIN_WC_BRANCH=${DOLPHIN_WC_BRANCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -P ${CMAKE_CURRENT_SOURCE_DIR} /CMake/ScmRevGen.cmake
804- BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR} /Source/Core/Common/scmrev.h" "${CMAKE_CURRENT_BINARY_DIR} /Source/Core/DolphinQt/Info.plist" "${CMAKE_CURRENT_BINARY_DIR} /Source/Core/MacUpdater/Info.plist"
821+ BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR} /Source/Core/Common/scmrev.h" "${CMAKE_CURRENT_BINARY_DIR} /Source/Core/DolphinQt/Info.plist" "${CMAKE_CURRENT_BINARY_DIR} /Source/Core/MacUpdater/Info.plist" " ${CMAKE_CURRENT_BINARY_DIR} /Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml"
805822 VERBATIM
806823)
807824
0 commit comments