mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-24 19:14:40 +00:00
fixed sdl3 under qt
This commit is contained in:
parent
9bdf781165
commit
40e2d8b9cf
@ -14,12 +14,6 @@ project(shadps4)
|
|||||||
|
|
||||||
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
|
option(ENABLE_QT_GUI "Enable the Qt GUI. If not selected then the emulator uses a minimal SDL-based UI instead" OFF)
|
||||||
|
|
||||||
if(ENABLE_QT_GUI)
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent)
|
|
||||||
qt_standard_project_setup()
|
|
||||||
set(CMAKE_AUTORCC ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# This function should be passed a list of all files in a target. It will automatically generate
|
# This function should be passed a list of all files in a target. It will automatically generate
|
||||||
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
|
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
|
||||||
# one in the filesystem.
|
# one in the filesystem.
|
||||||
@ -93,6 +87,12 @@ add_subdirectory(externals)
|
|||||||
add_subdirectory(third-party)
|
add_subdirectory(third-party)
|
||||||
include_directories(src)
|
include_directories(src)
|
||||||
|
|
||||||
|
if(ENABLE_QT_GUI)
|
||||||
|
find_package(Qt6 REQUIRED COMPONENTS Widgets Concurrent)
|
||||||
|
qt_standard_project_setup()
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(AUDIO_CORE src/audio_core/sdl_audio.cpp
|
set(AUDIO_CORE src/audio_core/sdl_audio.cpp
|
||||||
src/audio_core/sdl_audio.h
|
src/audio_core/sdl_audio.h
|
||||||
)
|
)
|
||||||
@ -331,7 +331,7 @@ endif()
|
|||||||
|
|
||||||
create_target_directory_groups(shadps4)
|
create_target_directory_groups(shadps4)
|
||||||
|
|
||||||
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11)
|
target_link_libraries(shadps4 PRIVATE magic_enum::magic_enum fmt::fmt toml11::toml11 SDL3-shared)
|
||||||
target_link_libraries(shadps4 PRIVATE discord-rpc vulkan-1 xxhash Zydis)
|
target_link_libraries(shadps4 PRIVATE discord-rpc vulkan-1 xxhash Zydis)
|
||||||
|
|
||||||
if(NOT ENABLE_QT_GUI)
|
if(NOT ENABLE_QT_GUI)
|
||||||
@ -374,12 +374,10 @@ add_custom_command(TARGET shadps4 POST_BUILD
|
|||||||
$<TARGET_FILE_DIR:shadps4>
|
$<TARGET_FILE_DIR:shadps4>
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT ENABLE_QT_GUI)
|
|
||||||
add_custom_command(TARGET shadps4 POST_BUILD
|
add_custom_command(TARGET shadps4 POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
$<TARGET_FILE:SDL3-shared>
|
$<TARGET_FILE:SDL3-shared>
|
||||||
$<TARGET_FILE_DIR:shadps4>)
|
$<TARGET_FILE_DIR:shadps4>)
|
||||||
endif()
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_custom_command(TARGET shadps4 POST_BUILD
|
add_custom_command(TARGET shadps4 POST_BUILD
|
||||||
|
2
externals/CMakeLists.txt
vendored
2
externals/CMakeLists.txt
vendored
@ -33,7 +33,5 @@ set(WITH_NEW_STRATEGIES ON)
|
|||||||
set(WITH_NATIVE_INSTRUCTIONS ON)
|
set(WITH_NATIVE_INSTRUCTIONS ON)
|
||||||
add_subdirectory(zlib-ng)
|
add_subdirectory(zlib-ng)
|
||||||
|
|
||||||
if(NOT ENABLE_QT_GUI)
|
|
||||||
# SDL3
|
# SDL3
|
||||||
add_subdirectory(sdl3 EXCLUDE_FROM_ALL)
|
add_subdirectory(sdl3 EXCLUDE_FROM_ALL)
|
||||||
endif()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user