2019-12-31 06:17:17 +00:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
|
2020-07-28 09:16:12 +00:00
|
|
|
set(SRCS
|
2020-06-24 15:31:23 +00:00
|
|
|
resources/resources.qrc
|
2020-06-11 04:36:48 +00:00
|
|
|
aboutdialog.cpp
|
|
|
|
aboutdialog.h
|
2020-04-30 14:59:31 +00:00
|
|
|
advancedsettingswidget.cpp
|
|
|
|
advancedsettingswidget.h
|
|
|
|
advancedsettingswidget.ui
|
2020-01-24 04:51:13 +00:00
|
|
|
audiosettingswidget.cpp
|
|
|
|
audiosettingswidget.h
|
|
|
|
audiosettingswidget.ui
|
2020-08-06 12:08:22 +00:00
|
|
|
autoupdaterdialog.cpp
|
|
|
|
autoupdaterdialog.h
|
|
|
|
autoupdaterdialog.ui
|
2020-09-22 13:08:07 +00:00
|
|
|
biossettingswidget.cpp
|
|
|
|
biossettingswidget.h
|
|
|
|
biossettingswidget.ui
|
2020-10-19 15:14:49 +00:00
|
|
|
cheatmanagerdialog.cpp
|
|
|
|
cheatmanagerdialog.h
|
|
|
|
cheatmanagerdialog.ui
|
|
|
|
cheatcodeeditordialog.cpp
|
|
|
|
cheatcodeeditordialog.h
|
|
|
|
cheatcodeeditordialog.ui
|
2019-12-31 06:17:17 +00:00
|
|
|
consolesettingswidget.cpp
|
|
|
|
consolesettingswidget.h
|
|
|
|
consolesettingswidget.ui
|
2020-05-20 13:26:24 +00:00
|
|
|
controllersettingswidget.cpp
|
|
|
|
controllersettingswidget.h
|
2020-12-16 15:18:13 +00:00
|
|
|
debuggermodels.cpp
|
|
|
|
debuggermodels.h
|
|
|
|
debuggerwindow.cpp
|
|
|
|
debuggerwindow.h
|
|
|
|
debuggerwindow.ui
|
2020-09-10 14:18:12 +00:00
|
|
|
displaysettingswidget.cpp
|
|
|
|
displaysettingswidget.h
|
|
|
|
displaysettingswidget.ui
|
2021-01-23 07:33:36 +00:00
|
|
|
emulationsettingswidget.cpp
|
|
|
|
emulationsettingswidget.h
|
|
|
|
emulationsettingswidget.ui
|
2020-09-10 14:18:12 +00:00
|
|
|
enhancementsettingswidget.cpp
|
|
|
|
enhancementsettingswidget.h
|
|
|
|
enhancementsettingswidget.ui
|
2020-08-01 16:57:12 +00:00
|
|
|
gamelistmodel.cpp
|
|
|
|
gamelistmodel.h
|
2020-08-01 17:03:25 +00:00
|
|
|
gamelistsearchdirectoriesmodel.cpp
|
|
|
|
gamelistsearchdirectoriesmodel.h
|
2019-12-31 06:17:17 +00:00
|
|
|
gamelistsettingswidget.cpp
|
|
|
|
gamelistsettingswidget.h
|
|
|
|
gamelistsettingswidget.ui
|
|
|
|
gamelistwidget.cpp
|
|
|
|
gamelistwidget.h
|
2020-05-16 10:02:44 +00:00
|
|
|
gamepropertiesdialog.cpp
|
|
|
|
gamepropertiesdialog.h
|
|
|
|
gamepropertiesdialog.ui
|
2020-12-17 17:32:29 +00:00
|
|
|
gdbconnection.cpp
|
|
|
|
gdbconnection.h
|
|
|
|
gdbserver.cpp
|
|
|
|
gdbserver.h
|
2020-03-22 03:16:32 +00:00
|
|
|
generalsettingswidget.cpp
|
|
|
|
generalsettingswidget.h
|
|
|
|
generalsettingswidget.ui
|
2020-01-05 02:46:03 +00:00
|
|
|
hotkeysettingswidget.cpp
|
|
|
|
hotkeysettingswidget.h
|
2020-07-22 16:35:15 +00:00
|
|
|
inputbindingdialog.cpp
|
|
|
|
inputbindingdialog.h
|
|
|
|
inputbindingdialog.ui
|
2020-11-13 23:32:35 +00:00
|
|
|
inputbindingmonitor.cpp
|
|
|
|
inputbindingmonitor.h
|
2020-01-05 02:46:03 +00:00
|
|
|
inputbindingwidgets.cpp
|
|
|
|
inputbindingwidgets.h
|
2019-12-31 06:17:17 +00:00
|
|
|
main.cpp
|
|
|
|
mainwindow.cpp
|
|
|
|
mainwindow.h
|
|
|
|
mainwindow.ui
|
2020-09-18 14:28:07 +00:00
|
|
|
memorycardeditordialog.cpp
|
|
|
|
memorycardeditordialog.h
|
|
|
|
memorycardeditordialog.ui
|
2020-05-20 13:26:24 +00:00
|
|
|
memorycardsettingswidget.cpp
|
|
|
|
memorycardsettingswidget.h
|
2020-12-16 15:18:13 +00:00
|
|
|
memoryviewwidget.cpp
|
|
|
|
memoryviewwidget.h
|
2020-09-12 15:20:02 +00:00
|
|
|
postprocessingchainconfigwidget.cpp
|
|
|
|
postprocessingchainconfigwidget.h
|
|
|
|
postprocessingchainconfigwidget.ui
|
2020-09-13 12:24:20 +00:00
|
|
|
postprocessingsettingswidget.cpp
|
|
|
|
postprocessingsettingswidget.h
|
|
|
|
postprocessingsettingswidget.ui
|
2020-09-12 15:20:02 +00:00
|
|
|
postprocessingshaderconfigwidget.cpp
|
|
|
|
postprocessingshaderconfigwidget.h
|
2020-03-12 03:53:51 +00:00
|
|
|
qtdisplaywidget.cpp
|
|
|
|
qtdisplaywidget.h
|
2019-12-31 06:17:17 +00:00
|
|
|
qthostinterface.cpp
|
|
|
|
qthostinterface.h
|
2020-03-12 05:32:15 +00:00
|
|
|
qtprogresscallback.cpp
|
|
|
|
qtprogresscallback.h
|
2019-12-31 06:17:17 +00:00
|
|
|
qtutils.cpp
|
|
|
|
qtutils.h
|
|
|
|
settingsdialog.cpp
|
|
|
|
settingsdialog.h
|
|
|
|
settingsdialog.ui
|
|
|
|
)
|
|
|
|
|
2020-07-28 09:16:12 +00:00
|
|
|
set(TS_FILES
|
2020-08-03 03:27:20 +00:00
|
|
|
translations/duckstation-qt_de.ts
|
2020-08-15 01:37:45 +00:00
|
|
|
translations/duckstation-qt_es.ts
|
2020-12-24 20:01:33 +00:00
|
|
|
translations/duckstation-qt_fr.ts
|
2020-08-14 14:12:47 +00:00
|
|
|
translations/duckstation-qt_he.ts
|
2020-08-17 01:54:10 +00:00
|
|
|
translations/duckstation-qt_it.ts
|
2020-12-24 20:01:33 +00:00
|
|
|
translations/duckstation-qt_ja.ts
|
|
|
|
translations/duckstation-qt_nl.ts
|
2021-01-04 14:32:41 +00:00
|
|
|
translations/duckstation-qt_pl.ts
|
2020-08-02 03:21:16 +00:00
|
|
|
translations/duckstation-qt_pt-br.ts
|
|
|
|
translations/duckstation-qt_pt-pt.ts
|
2020-12-24 20:01:33 +00:00
|
|
|
translations/duckstation-qt_ru.ts
|
2020-08-14 20:47:23 +00:00
|
|
|
translations/duckstation-qt_zh-cn.ts
|
2020-07-28 09:16:12 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations")
|
|
|
|
qt5_add_translation(QM_FILES ${TS_FILES})
|
|
|
|
|
|
|
|
add_executable(duckstation-qt ${SRCS} ${QM_FILES})
|
2020-05-07 12:49:04 +00:00
|
|
|
target_include_directories(duckstation-qt PRIVATE "${Qt5Gui_PRIVATE_INCLUDE_DIRS}")
|
2020-06-18 14:18:53 +00:00
|
|
|
target_link_libraries(duckstation-qt PRIVATE frontend-common core common imgui glad minizip scmversion vulkan-loader Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Network)
|
2020-01-07 05:54:37 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
2020-05-16 03:10:31 +00:00
|
|
|
# We want a Windows subsystem application not console.
|
|
|
|
set_target_properties(duckstation-qt PROPERTIES
|
|
|
|
WIN32_EXECUTABLE TRUE
|
|
|
|
DEBUG_POSTFIX "-debug")
|
|
|
|
|
|
|
|
# Copy in Qt DLLs. Borrowed from Dolphin.
|
|
|
|
get_target_property(MOC_EXECUTABLE_LOCATION Qt5::moc IMPORTED_LOCATION)
|
|
|
|
get_filename_component(QT_BINARY_DIRECTORY "${MOC_EXECUTABLE_LOCATION}" DIRECTORY)
|
|
|
|
find_program(WINDEPLOYQT_EXE windeployqt HINTS "${QT_BINARY_DIRECTORY}")
|
|
|
|
add_custom_command(TARGET duckstation-qt POST_BUILD
|
|
|
|
COMMAND "${CMAKE_COMMAND}" -E env PATH="${QT_BINARY_DIRECTORY}"
|
|
|
|
"${WINDEPLOYQT_EXE}" --libdir="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
|
|
|
--plugindir="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/QtPlugins"
|
|
|
|
$<IF:$<CONFIG:Debug>,--debug,--release>
|
|
|
|
--no-translations
|
|
|
|
--no-compiler-runtime
|
|
|
|
--no-angle
|
|
|
|
"$<TARGET_FILE:duckstation-qt>"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET duckstation-qt POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.win" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf"
|
|
|
|
)
|
2020-01-07 05:54:37 +00:00
|
|
|
endif()
|
2020-08-25 12:04:55 +00:00
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
include(BundleUtilities)
|
|
|
|
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DuckStation.app)
|
|
|
|
|
|
|
|
# Ask for an application bundle.
|
|
|
|
set_target_properties(duckstation-qt PROPERTIES
|
|
|
|
MACOSX_BUNDLE true
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
|
|
|
|
OUTPUT_NAME DuckStation
|
|
|
|
)
|
|
|
|
|
|
|
|
# Copy qt.conf into the bundle
|
|
|
|
target_sources(duckstation-qt PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf")
|
|
|
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
|
|
|
|
|
|
# Copy icon into the bundle
|
|
|
|
target_sources(duckstation-qt PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/DuckStation.icns")
|
|
|
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/DuckStation.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
|
|
|
|
|
|
# Copy Qt plugins into the bundle
|
|
|
|
get_target_property(qtcocoa_location Qt5::QCocoaIntegrationPlugin LOCATION)
|
|
|
|
target_sources(duckstation-qt PRIVATE "${qtcocoa_location}")
|
|
|
|
set_source_files_properties("${qtcocoa_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/platforms)
|
|
|
|
|
|
|
|
get_target_property(qtmacstyle_location Qt5::QMacStylePlugin LOCATION)
|
|
|
|
target_sources(duckstation-qt PRIVATE "${qtmacstyle_location}")
|
|
|
|
set_source_files_properties("${qtmacstyle_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/styles)
|
|
|
|
|
|
|
|
# Copy resources into the bundle
|
|
|
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/data")
|
|
|
|
file(GLOB_RECURSE resources RELATIVE "${CMAKE_SOURCE_DIR}/data" "${CMAKE_SOURCE_DIR}/data/*")
|
|
|
|
foreach(res ${resources})
|
|
|
|
target_sources(duckstation-qt PRIVATE "${CMAKE_SOURCE_DIR}/data/${res}")
|
|
|
|
get_filename_component(resdir "${res}" DIRECTORY)
|
|
|
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/data/${res}" PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION "MacOS/${resdir}")
|
|
|
|
source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/data/${res}")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# Copy translations into the bundle
|
|
|
|
add_custom_command(TARGET duckstation-qt
|
|
|
|
POST_BUILD
|
2020-10-17 08:50:16 +00:00
|
|
|
COMMAND mkdir -p $<TARGET_FILE_DIR:duckstation-qt>/translations
|
2020-08-25 12:04:55 +00:00
|
|
|
COMMAND cp ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/translations/*.qm $<TARGET_FILE_DIR:duckstation-qt>/translations)
|
|
|
|
|
|
|
|
# Copy MoltenVK into the bundle
|
|
|
|
target_sources(duckstation-qt PRIVATE "${CMAKE_SOURCE_DIR}/dep/mac/MoltenVK/libvulkan.dylib")
|
|
|
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/dep/mac/MoltenVK/libvulkan.dylib" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks)
|
|
|
|
|
|
|
|
# Update library references to make the bundle portable
|
|
|
|
include(DolphinPostprocessBundle)
|
|
|
|
dolphin_postprocess_bundle(duckstation-qt)
|
|
|
|
# Fix rpath
|
|
|
|
add_custom_command(TARGET duckstation-qt
|
|
|
|
POST_BUILD COMMAND
|
|
|
|
${CMAKE_INSTALL_NAME_TOOL} -add_rpath "@executable_path/../Frameworks/"
|
|
|
|
$<TARGET_FILE:duckstation-qt>)
|
|
|
|
endif()
|
|
|
|
|