2023-09-16 15:40:25 +00:00
|
|
|
include(CopyBaseTranslations)
|
|
|
|
|
2021-12-13 12:12:54 +00:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
|
|
|
|
add_executable(pcsx2-qt)
|
|
|
|
|
|
|
|
target_sources(pcsx2-qt PRIVATE
|
|
|
|
AboutDialog.cpp
|
|
|
|
AboutDialog.h
|
|
|
|
AboutDialog.ui
|
2022-05-12 16:07:09 +00:00
|
|
|
AutoUpdaterDialog.cpp
|
|
|
|
AutoUpdaterDialog.h
|
|
|
|
AutoUpdaterDialog.ui
|
2023-01-15 07:00:52 +00:00
|
|
|
ColorPickerButton.cpp
|
|
|
|
ColorPickerButton.h
|
2022-09-03 11:29:02 +00:00
|
|
|
CoverDownloadDialog.cpp
|
|
|
|
CoverDownloadDialog.h
|
|
|
|
CoverDownloadDialog.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
DisplayWidget.cpp
|
|
|
|
DisplayWidget.h
|
2022-05-27 09:48:59 +00:00
|
|
|
EarlyHardwareCheck.cpp
|
2021-12-13 12:12:54 +00:00
|
|
|
MainWindow.cpp
|
|
|
|
MainWindow.h
|
|
|
|
MainWindow.ui
|
|
|
|
PrecompiledHeader.cpp
|
|
|
|
PrecompiledHeader.h
|
2023-04-25 10:24:22 +00:00
|
|
|
SettingWidgetBinder.h
|
2023-06-23 13:18:10 +00:00
|
|
|
SetupWizardDialog.cpp
|
|
|
|
SetupWizardDialog.h
|
|
|
|
SetupWizardDialog.ui
|
2023-04-25 10:24:22 +00:00
|
|
|
Themes.cpp
|
2023-06-19 12:03:10 +00:00
|
|
|
Translations.cpp
|
2021-12-13 12:12:54 +00:00
|
|
|
QtHost.cpp
|
|
|
|
QtHost.h
|
|
|
|
QtKeyCodes.cpp
|
2022-09-03 11:29:02 +00:00
|
|
|
QtProgressCallback.cpp
|
|
|
|
QtProgressCallback.h
|
2021-12-13 12:12:54 +00:00
|
|
|
QtUtils.cpp
|
|
|
|
QtUtils.h
|
2022-05-07 06:32:44 +00:00
|
|
|
GameList/EmptyGameListWidget.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
GameList/GameListModel.cpp
|
|
|
|
GameList/GameListModel.h
|
|
|
|
GameList/GameListRefreshThread.cpp
|
|
|
|
GameList/GameListRefreshThread.h
|
|
|
|
GameList/GameListWidget.cpp
|
|
|
|
GameList/GameListWidget.h
|
2023-09-16 05:19:51 +00:00
|
|
|
Settings/AchievementLoginDialog.cpp
|
|
|
|
Settings/AchievementLoginDialog.h
|
|
|
|
Settings/AchievementLoginDialog.ui
|
|
|
|
Settings/AchievementSettingsWidget.cpp
|
|
|
|
Settings/AchievementSettingsWidget.h
|
|
|
|
Settings/AchievementSettingsWidget.ui
|
2022-11-23 13:20:49 +00:00
|
|
|
Settings/AdvancedSettingsWidget.cpp
|
|
|
|
Settings/AdvancedSettingsWidget.h
|
|
|
|
Settings/AdvancedSettingsWidget.ui
|
2022-02-15 14:59:15 +00:00
|
|
|
Settings/AudioSettingsWidget.cpp
|
|
|
|
Settings/AudioSettingsWidget.h
|
|
|
|
Settings/AudioSettingsWidget.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
Settings/BIOSSettingsWidget.cpp
|
|
|
|
Settings/BIOSSettingsWidget.h
|
|
|
|
Settings/BIOSSettingsWidget.ui
|
|
|
|
Settings/ControllerBindingWidget.ui
|
|
|
|
Settings/ControllerBindingWidget_DualShock2.ui
|
2023-06-11 06:06:40 +00:00
|
|
|
Settings/ControllerBindingWidget_Guitar.ui
|
2024-01-01 23:17:33 +00:00
|
|
|
Settings/ControllerBindingWidget_Popn.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
Settings/ControllerBindingWidgets.cpp
|
|
|
|
Settings/ControllerBindingWidgets.h
|
2023-01-15 07:00:52 +00:00
|
|
|
Settings/ControllerLEDSettingsDialog.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
Settings/ControllerGlobalSettingsWidget.cpp
|
|
|
|
Settings/ControllerGlobalSettingsWidget.h
|
|
|
|
Settings/ControllerGlobalSettingsWidget.ui
|
2022-08-05 13:52:16 +00:00
|
|
|
Settings/ControllerMacroEditWidget.ui
|
|
|
|
Settings/ControllerMacroWidget.ui
|
2023-02-11 23:58:58 +00:00
|
|
|
Settings/ControllerMouseSettingsDialog.ui
|
2023-10-14 08:45:09 +00:00
|
|
|
Settings/ControllerSettingsWindow.cpp
|
|
|
|
Settings/ControllerSettingsWindow.h
|
|
|
|
Settings/ControllerSettingsWindow.ui
|
2022-06-08 12:15:10 +00:00
|
|
|
Settings/ControllerSettingWidgetBinder.h
|
2022-12-24 03:58:21 +00:00
|
|
|
Settings/DebugSettingsWidget.cpp
|
|
|
|
Settings/DebugSettingsWidget.h
|
|
|
|
Settings/DebugSettingsWidget.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
Settings/EmulationSettingsWidget.cpp
|
|
|
|
Settings/EmulationSettingsWidget.h
|
|
|
|
Settings/EmulationSettingsWidget.ui
|
2022-06-18 10:20:24 +00:00
|
|
|
Settings/FolderSettingsWidget.cpp
|
|
|
|
Settings/FolderSettingsWidget.h
|
|
|
|
Settings/FolderSettingsWidget.ui
|
2023-05-25 16:24:01 +00:00
|
|
|
Settings/GameCheatSettingsWidget.cpp
|
|
|
|
Settings/GameCheatSettingsWidget.h
|
|
|
|
Settings/GameCheatSettingsWidget.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
Settings/GameFixSettingsWidget.cpp
|
|
|
|
Settings/GameFixSettingsWidget.h
|
|
|
|
Settings/GameFixSettingsWidget.ui
|
|
|
|
Settings/GameListSettingsWidget.cpp
|
|
|
|
Settings/GameListSettingsWidget.h
|
|
|
|
Settings/GameListSettingsWidget.ui
|
2023-05-25 16:24:01 +00:00
|
|
|
Settings/GamePatchDetailsWidget.ui
|
|
|
|
Settings/GamePatchSettingsWidget.cpp
|
|
|
|
Settings/GamePatchSettingsWidget.h
|
|
|
|
Settings/GamePatchSettingsWidget.ui
|
2022-02-15 14:59:15 +00:00
|
|
|
Settings/GameSummaryWidget.cpp
|
|
|
|
Settings/GameSummaryWidget.h
|
|
|
|
Settings/GameSummaryWidget.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
Settings/GraphicsSettingsWidget.cpp
|
|
|
|
Settings/GraphicsSettingsWidget.h
|
|
|
|
Settings/GraphicsSettingsWidget.ui
|
|
|
|
Settings/HotkeySettingsWidget.cpp
|
|
|
|
Settings/HotkeySettingsWidget.h
|
|
|
|
Settings/InputBindingDialog.cpp
|
|
|
|
Settings/InputBindingDialog.h
|
|
|
|
Settings/InputBindingDialog.ui
|
|
|
|
Settings/InputBindingWidget.cpp
|
|
|
|
Settings/InputBindingWidget.h
|
|
|
|
Settings/InterfaceSettingsWidget.cpp
|
|
|
|
Settings/InterfaceSettingsWidget.h
|
|
|
|
Settings/InterfaceSettingsWidget.ui
|
2022-08-28 21:31:19 +00:00
|
|
|
Settings/MemoryCardConvertDialog.cpp
|
|
|
|
Settings/MemoryCardConvertDialog.h
|
|
|
|
Settings/MemoryCardConvertDialog.ui
|
|
|
|
Settings/MemoryCardConvertWorker.cpp
|
|
|
|
Settings/MemoryCardConvertWorker.h
|
2023-07-04 10:51:56 +00:00
|
|
|
Settings/MemoryCardCreateDialog.cpp
|
|
|
|
Settings/MemoryCardCreateDialog.h
|
|
|
|
Settings/MemoryCardCreateDialog.ui
|
2022-02-15 14:59:15 +00:00
|
|
|
Settings/MemoryCardSettingsWidget.cpp
|
|
|
|
Settings/MemoryCardSettingsWidget.h
|
|
|
|
Settings/MemoryCardSettingsWidget.ui
|
2022-05-22 12:49:40 +00:00
|
|
|
Settings/DEV9DnsHostDialog.cpp
|
|
|
|
Settings/DEV9DnsHostDialog.h
|
|
|
|
Settings/DEV9DnsHostDialog.ui
|
2022-03-13 17:58:39 +00:00
|
|
|
Settings/DEV9SettingsWidget.cpp
|
|
|
|
Settings/DEV9SettingsWidget.h
|
|
|
|
Settings/DEV9SettingsWidget.ui
|
2022-05-22 12:35:59 +00:00
|
|
|
Settings/DEV9UiCommon.cpp
|
|
|
|
Settings/DEV9UiCommon.h
|
2022-03-13 17:58:39 +00:00
|
|
|
Settings/HddCreateQt.cpp
|
|
|
|
Settings/HddCreateQt.h
|
2023-05-25 16:24:01 +00:00
|
|
|
Settings/PatchDetailsWidget.ui
|
2023-10-14 08:45:09 +00:00
|
|
|
Settings/SettingsWindow.cpp
|
|
|
|
Settings/SettingsWindow.h
|
|
|
|
Settings/SettingsWindow.ui
|
2022-12-04 15:00:06 +00:00
|
|
|
Settings/USBBindingWidget_DrivingForce.ui
|
|
|
|
Settings/USBBindingWidget_GTForce.ui
|
2023-07-23 05:35:32 +00:00
|
|
|
Settings/USBBindingWidget_GunCon2.ui
|
2022-12-24 06:51:44 +00:00
|
|
|
Debugger/CpuWidget.cpp
|
|
|
|
Debugger/CpuWidget.h
|
|
|
|
Debugger/CpuWidget.ui
|
|
|
|
Debugger/DebuggerWindow.cpp
|
|
|
|
Debugger/DebuggerWindow.h
|
|
|
|
Debugger/DebuggerWindow.ui
|
|
|
|
Debugger/DisassemblyWidget.cpp
|
|
|
|
Debugger/DisassemblyWidget.h
|
|
|
|
Debugger/DisassemblyWidget.ui
|
|
|
|
Debugger/MemoryViewWidget.cpp
|
|
|
|
Debugger/MemoryViewWidget.h
|
|
|
|
Debugger/MemoryViewWidget.ui
|
|
|
|
Debugger/RegisterWidget.cpp
|
|
|
|
Debugger/RegisterWidget.h
|
|
|
|
Debugger/RegisterWidget.ui
|
|
|
|
Debugger/BreakpointDialog.cpp
|
|
|
|
Debugger/BreakpointDialog.h
|
|
|
|
Debugger/BreakpointDialog.ui
|
2023-01-03 05:27:05 +00:00
|
|
|
Debugger/Models/BreakpointModel.cpp
|
|
|
|
Debugger/Models/BreakpointModel.h
|
2023-01-04 07:11:28 +00:00
|
|
|
Debugger/Models/ThreadModel.cpp
|
|
|
|
Debugger/Models/ThreadModel.h
|
2023-01-07 02:35:57 +00:00
|
|
|
Debugger/Models/StackModel.cpp
|
|
|
|
Debugger/Models/StackModel.h
|
2023-12-31 02:05:16 +00:00
|
|
|
Debugger/Models/SavedAddressesModel.cpp
|
|
|
|
Debugger/Models/SavedAddressesModel.h
|
2022-04-04 21:35:08 +00:00
|
|
|
Tools/InputRecording/NewInputRecordingDlg.cpp
|
|
|
|
Tools/InputRecording/NewInputRecordingDlg.h
|
|
|
|
Tools/InputRecording/NewInputRecordingDlg.ui
|
2022-06-16 00:44:14 +00:00
|
|
|
Tools/InputRecording/InputRecordingViewer.cpp
|
|
|
|
Tools/InputRecording/InputRecordingViewer.h
|
|
|
|
Tools/InputRecording/InputRecordingViewer.ui
|
2021-12-13 12:12:54 +00:00
|
|
|
resources/resources.qrc
|
|
|
|
)
|
|
|
|
|
2023-06-24 05:13:36 +00:00
|
|
|
file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Translations/*.ts)
|
2023-06-19 12:03:10 +00:00
|
|
|
|
2021-12-13 12:12:54 +00:00
|
|
|
target_precompile_headers(pcsx2-qt PRIVATE PrecompiledHeader.h)
|
2023-12-24 15:22:40 +00:00
|
|
|
set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE)
|
2021-12-13 12:12:54 +00:00
|
|
|
|
|
|
|
target_include_directories(pcsx2-qt PRIVATE
|
|
|
|
${Qt6Gui_PRIVATE_INCLUDE_DIRS}
|
|
|
|
"${CMAKE_BINARY_DIR}/common/include"
|
|
|
|
"${CMAKE_SOURCE_DIR}/pcsx2"
|
|
|
|
"${CMAKE_SOURCE_DIR}/pcsx2-qt"
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(pcsx2-qt PRIVATE
|
|
|
|
PCSX2_FLAGS
|
|
|
|
PCSX2
|
|
|
|
Qt6::Core
|
|
|
|
Qt6::Gui
|
|
|
|
Qt6::Widgets
|
|
|
|
)
|
2022-05-12 16:07:09 +00:00
|
|
|
|
2022-12-28 14:02:53 +00:00
|
|
|
# Our Qt builds may have exceptions on, so force them off.
|
|
|
|
target_compile_definitions(pcsx2-qt PRIVATE QT_NO_EXCEPTIONS)
|
|
|
|
|
2023-06-19 12:03:10 +00:00
|
|
|
if(WIN32)
|
|
|
|
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_SOURCE_DIR}/bin/translations")
|
|
|
|
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES})
|
2023-09-16 15:40:25 +00:00
|
|
|
copy_base_translations(pcsx2-qt)
|
2023-06-19 12:03:10 +00:00
|
|
|
elseif(APPLE)
|
2023-07-15 20:34:20 +00:00
|
|
|
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES)
|
2023-07-15 20:59:23 +00:00
|
|
|
set(PCSX2_MACOS_LOCALIZATIONS)
|
|
|
|
foreach (TS_FILE IN LISTS TS_FILES)
|
|
|
|
get_filename_component(TS_FILE_NAME ${TS_FILE} NAME)
|
|
|
|
set(regex "^pcsx2-qt_([a-zA-Z0-9\\-]+)\\.ts$")
|
|
|
|
if (TS_FILE_NAME MATCHES ${regex})
|
|
|
|
string(REGEX REPLACE ${regex} "\\1" language ${TS_FILE_NAME})
|
|
|
|
string(REPLACE "-" "_" language ${language})
|
|
|
|
set(PCSX2_MACOS_LOCALIZATIONS "${PCSX2_MACOS_LOCALIZATIONS}\n\t\t<string>${language}</string>")
|
|
|
|
else()
|
|
|
|
message(WARNING "Unrecognized ts file ${TS_FILE_NAME}")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
2023-07-15 20:34:20 +00:00
|
|
|
foreach (QM_FILE IN LISTS QM_FILES)
|
|
|
|
target_sources(pcsx2-qt PRIVATE ${QM_FILE})
|
|
|
|
set_source_files_properties(${QM_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/translations/)
|
|
|
|
endforeach()
|
2023-09-16 15:40:25 +00:00
|
|
|
copy_base_translations(pcsx2-qt)
|
2023-10-31 04:08:02 +00:00
|
|
|
extract_translation_from_ts(Translations/pcsx2-qt_en.ts source PermissionsDialogMicrophone PCSX2_MICROPHONE_USAGE_DESCRIPTION)
|
2023-06-19 12:03:10 +00:00
|
|
|
else()
|
|
|
|
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES)
|
|
|
|
set(QM_OUTPUT_DIR "$<TARGET_FILE_DIR:pcsx2-qt>/translations")
|
|
|
|
add_custom_command(TARGET pcsx2-qt POST_BUILD COMMAND "${CMAKE_COMMAND}" -E make_directory "${QM_OUTPUT_DIR}")
|
|
|
|
foreach (QM_FILE IN LISTS QM_FILES)
|
|
|
|
get_filename_component(QM_FILE_NAME ${QM_FILE} NAME)
|
|
|
|
add_custom_command(TARGET pcsx2-qt POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${QM_FILE}" "${QM_OUTPUT_DIR}/${QM_FILE_NAME}")
|
|
|
|
endforeach()
|
2023-09-16 15:40:25 +00:00
|
|
|
copy_base_translations(pcsx2-qt)
|
2023-06-19 12:03:10 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2022-05-12 16:07:09 +00:00
|
|
|
# Currently, 7z is only needed for the Windows updater.
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(pcsx2-qt PRIVATE
|
|
|
|
LZMA::LZMA
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2022-05-23 10:01:51 +00:00
|
|
|
setup_main_executable(pcsx2-qt)
|