2018-04-04 10:12:07 -06:00
|
|
|
find_package(Qt5 REQUIRED COMPONENTS Gui Widgets)
|
2017-09-04 11:35:38 -06:00
|
|
|
|
2017-06-03 16:47:13 -06:00
|
|
|
set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES "")
|
2017-01-26 06:00:28 -07:00
|
|
|
message(STATUS "Found Qt version ${Qt5Core_VERSION}")
|
|
|
|
|
2015-11-27 01:33:07 -07:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
2018-01-26 01:26:45 -07:00
|
|
|
add_executable(dolphin-emu
|
2017-03-01 05:43:43 -07:00
|
|
|
AboutDialog.cpp
|
2018-03-25 20:17:47 -06:00
|
|
|
CheatsManager.cpp
|
2017-08-30 08:44:28 -06:00
|
|
|
FIFOPlayerWindow.cpp
|
2017-06-06 05:49:49 -06:00
|
|
|
HotkeyScheduler.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
Host.cpp
|
|
|
|
Main.cpp
|
|
|
|
MainWindow.cpp
|
|
|
|
MenuBar.cpp
|
|
|
|
RenderWidget.cpp
|
|
|
|
Resources.cpp
|
2018-03-21 04:13:53 -06:00
|
|
|
SearchBar.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
Settings.cpp
|
|
|
|
ToolBar.cpp
|
2017-07-17 15:50:40 -06:00
|
|
|
Translation.cpp
|
2017-06-14 03:58:11 -06:00
|
|
|
WiiUpdate.cpp
|
|
|
|
WiiUpdate.h
|
2018-01-24 05:35:13 -07:00
|
|
|
Config/CheatCodeEditor.cpp
|
2018-01-01 13:01:58 -07:00
|
|
|
Config/ARCodeWidget.cpp
|
2017-09-10 11:10:45 -06:00
|
|
|
Config/CheatWarningWidget.cpp
|
2017-05-09 10:49:10 -06:00
|
|
|
Config/ControllersWindow.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
Config/FilesystemWidget.cpp
|
2018-03-01 05:12:31 -07:00
|
|
|
Config/GameConfigWidget.cpp
|
2017-09-10 11:10:45 -06:00
|
|
|
Config/GeckoCodeWidget.cpp
|
2017-06-15 17:42:12 -06:00
|
|
|
Config/Graphics/AdvancedWidget.cpp
|
|
|
|
Config/Graphics/EnhancementsWidget.cpp
|
|
|
|
Config/Graphics/GeneralWidget.cpp
|
|
|
|
Config/Graphics/HacksWidget.cpp
|
|
|
|
Config/Graphics/GraphicsBool.cpp
|
|
|
|
Config/Graphics/GraphicsChoice.cpp
|
2018-03-16 07:10:22 -06:00
|
|
|
Config/Graphics/GraphicsRadio.cpp
|
2017-06-15 17:42:12 -06:00
|
|
|
Config/Graphics/GraphicsSlider.cpp
|
|
|
|
Config/Graphics/GraphicsWidget.cpp
|
|
|
|
Config/Graphics/GraphicsWindow.cpp
|
2017-06-15 17:43:14 -06:00
|
|
|
Config/Graphics/SoftwareRendererWidget.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
Config/InfoWidget.cpp
|
2017-08-27 16:10:06 -06:00
|
|
|
Config/LogConfigWidget.cpp
|
|
|
|
Config/LogWidget.cpp
|
2017-05-20 09:53:17 -06:00
|
|
|
Config/Mapping/GCKeyboardEmu.cpp
|
2018-01-04 11:38:09 -07:00
|
|
|
Config/Mapping/GCMicrophone.cpp
|
2017-05-20 09:53:17 -06:00
|
|
|
Config/Mapping/GCPadEmu.cpp
|
2017-11-04 19:45:37 -06:00
|
|
|
Config/Mapping/GCPadWiiUConfigDialog.cpp
|
2017-06-06 05:49:49 -06:00
|
|
|
Config/Mapping/Hotkey3D.cpp
|
2018-02-14 15:25:01 -07:00
|
|
|
Config/Mapping/HotkeyDebugging.cpp
|
2017-06-06 05:49:49 -06:00
|
|
|
Config/Mapping/HotkeyGeneral.cpp
|
|
|
|
Config/Mapping/HotkeyGraphics.cpp
|
|
|
|
Config/Mapping/HotkeyStates.cpp
|
|
|
|
Config/Mapping/HotkeyTAS.cpp
|
|
|
|
Config/Mapping/HotkeyWii.cpp
|
2017-06-13 09:16:41 -06:00
|
|
|
Config/Mapping/IOWindow.cpp
|
2017-05-20 09:53:17 -06:00
|
|
|
Config/Mapping/MappingBool.cpp
|
|
|
|
Config/Mapping/MappingButton.cpp
|
2017-06-13 09:16:41 -06:00
|
|
|
Config/Mapping/MappingCommon.cpp
|
2018-02-07 10:16:15 -07:00
|
|
|
Config/Mapping/MappingIndicator.cpp
|
2017-05-20 09:53:17 -06:00
|
|
|
Config/Mapping/MappingNumeric.cpp
|
|
|
|
Config/Mapping/MappingWidget.cpp
|
|
|
|
Config/Mapping/MappingWindow.cpp
|
|
|
|
Config/Mapping/WiimoteEmuExtension.cpp
|
|
|
|
Config/Mapping/WiimoteEmuGeneral.cpp
|
|
|
|
Config/Mapping/WiimoteEmuMotionControl.cpp
|
2018-02-16 06:53:52 -07:00
|
|
|
Config/NewPatchDialog.cpp
|
|
|
|
Config/PatchesWidget.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
Config/PropertiesDialog.cpp
|
|
|
|
Config/SettingsWindow.cpp
|
2017-10-03 10:43:44 -06:00
|
|
|
Debugger/BreakpointWidget.cpp
|
2018-02-14 15:25:01 -07:00
|
|
|
Debugger/CodeViewWidget.cpp
|
|
|
|
Debugger/CodeWidget.cpp
|
2018-03-16 05:39:53 -06:00
|
|
|
Debugger/MemoryViewWidget.cpp
|
|
|
|
Debugger/MemoryWidget.cpp
|
2017-10-03 10:43:44 -06:00
|
|
|
Debugger/NewBreakpointDialog.cpp
|
2017-09-13 11:33:45 -06:00
|
|
|
Debugger/RegisterColumn.cpp
|
|
|
|
Debugger/RegisterWidget.cpp
|
2017-09-27 00:53:05 -06:00
|
|
|
Debugger/WatchWidget.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
GameList/GameList.cpp
|
|
|
|
GameList/GameListModel.cpp
|
|
|
|
GameList/GameTracker.cpp
|
2017-08-05 02:28:53 -06:00
|
|
|
GameList/GridProxyModel.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
GameList/ListProxyModel.cpp
|
2018-01-25 11:54:50 -07:00
|
|
|
GCMemcardManager.cpp
|
2017-06-26 23:44:10 -06:00
|
|
|
QtUtils/BlockUserInputFilter.cpp
|
2017-07-21 14:48:21 -06:00
|
|
|
NetPlay/GameListDialog.cpp
|
|
|
|
NetPlay/MD5Dialog.cpp
|
|
|
|
NetPlay/NetPlayDialog.cpp
|
|
|
|
NetPlay/NetPlaySetupDialog.cpp
|
|
|
|
NetPlay/PadMappingDialog.cpp
|
2017-05-31 01:16:23 -06:00
|
|
|
QtUtils/DoubleClickEventFilter.cpp
|
2017-05-31 00:08:14 -06:00
|
|
|
QtUtils/ElidedButton.cpp
|
2017-12-31 12:33:36 -07:00
|
|
|
QtUtils/ImageConverter.cpp
|
2017-06-14 19:49:56 -06:00
|
|
|
QtUtils/WindowActivationEventFilter.cpp
|
2018-03-26 00:13:15 -06:00
|
|
|
QtUtils/WinIconHelper.cpp
|
2018-03-17 09:07:51 -06:00
|
|
|
QtUtils/WrapInScrollArea.cpp
|
2018-01-27 06:35:02 -07:00
|
|
|
QtUtils/AspectRatioWidget.cpp
|
2017-06-27 22:36:27 -06:00
|
|
|
Settings/AdvancedPane.cpp
|
2017-06-21 02:27:21 -06:00
|
|
|
Settings/AudioPane.cpp
|
2018-01-03 17:41:31 -07:00
|
|
|
Settings/GameCubePane.cpp
|
2017-05-03 22:19:51 -06:00
|
|
|
Settings/GeneralPane.cpp
|
2017-05-04 01:47:59 -06:00
|
|
|
Settings/InterfacePane.cpp
|
2017-05-31 02:08:04 -06:00
|
|
|
Settings/PathPane.cpp
|
2017-07-21 03:22:01 -06:00
|
|
|
Settings/WiiPane.cpp
|
|
|
|
Settings/USBDeviceAddToWhitelistDialog.cpp
|
2018-01-27 06:35:02 -07:00
|
|
|
TAS/GCTASInputWindow.cpp
|
2018-01-31 04:35:09 -07:00
|
|
|
TAS/WiiTASInputWindow.cpp
|
|
|
|
TAS/Shared.cpp
|
2018-01-27 06:35:02 -07:00
|
|
|
TAS/StickWidget.cpp
|
2018-02-06 04:10:28 -07:00
|
|
|
TAS/IRWidget.cpp
|
2018-03-22 05:20:15 -06:00
|
|
|
Updater.cpp
|
2017-03-01 05:43:43 -07:00
|
|
|
)
|
2015-11-27 01:33:07 -07:00
|
|
|
|
2018-01-26 01:26:45 -07:00
|
|
|
target_compile_definitions(dolphin-emu
|
2018-04-05 05:52:21 -06:00
|
|
|
PRIVATE
|
|
|
|
-DQT_USE_QSTRINGBUILDER
|
|
|
|
-DQT_NO_CAST_FROM_ASCII
|
|
|
|
-DQT_NO_CAST_TO_ASCII
|
|
|
|
)
|
|
|
|
|
2018-01-26 01:26:45 -07:00
|
|
|
target_include_directories(dolphin-emu
|
2018-04-05 05:52:21 -06:00
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2018-01-26 01:26:45 -07:00
|
|
|
target_link_libraries(dolphin-emu
|
2018-04-02 10:32:28 -06:00
|
|
|
PRIVATE
|
|
|
|
core
|
|
|
|
Qt5::Widgets
|
|
|
|
uicommon
|
|
|
|
)
|
2015-11-27 01:33:07 -07:00
|
|
|
|
2017-02-10 00:46:23 -07:00
|
|
|
if(WIN32)
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE DolphinQt2.manifest)
|
2017-02-10 00:46:23 -07:00
|
|
|
endif()
|
|
|
|
|
2017-07-17 15:50:40 -06:00
|
|
|
# Handle localization
|
|
|
|
find_package(Gettext)
|
|
|
|
if(GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE)
|
|
|
|
set(pot_file "${CMAKE_SOURCE_DIR}/Languages/po/dolphin-emu.pot")
|
|
|
|
file(GLOB LINGUAS ${CMAKE_SOURCE_DIR}/Languages/po/*.po)
|
|
|
|
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE ${pot_file} ${LINGUAS})
|
2017-07-17 15:50:40 -06:00
|
|
|
source_group("Localization" FILES ${LINGUAS})
|
|
|
|
source_group("Localization\\\\Generated" FILES ${pot_file})
|
|
|
|
|
|
|
|
foreach(po ${LINGUAS})
|
|
|
|
get_filename_component(lang ${po} NAME_WE)
|
|
|
|
set(mo_dir ${CMAKE_CURRENT_BINARY_DIR}/${lang})
|
|
|
|
set(mo ${mo_dir}/dolphin-emu.mo)
|
|
|
|
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE ${mo})
|
2017-07-17 15:50:40 -06:00
|
|
|
source_group("Localization\\\\Generated" FILES ${mo})
|
|
|
|
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
|
|
set_source_files_properties(${mo} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${lang}.lproj")
|
|
|
|
else()
|
|
|
|
install(FILES ${mo} DESTINATION share/locale/${lang}/LC_MESSAGES)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_custom_command(OUTPUT ${mo}
|
2018-04-05 10:44:47 -06:00
|
|
|
COMMAND cmake -E make_directory ${mo_dir}
|
2017-07-17 15:50:40 -06:00
|
|
|
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${po} ${pot_file}
|
|
|
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
|
|
|
|
DEPENDS ${po}
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
2016-05-04 00:25:53 -06:00
|
|
|
if(APPLE)
|
2017-03-01 05:43:43 -07:00
|
|
|
include(BundleUtilities)
|
2018-01-26 01:26:45 -07:00
|
|
|
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Dolphin.app)
|
2016-05-04 00:25:53 -06:00
|
|
|
|
2017-03-01 05:43:43 -07:00
|
|
|
# Ask for an application bundle.
|
2018-01-26 01:26:45 -07:00
|
|
|
set_target_properties(dolphin-emu PROPERTIES
|
2017-03-01 05:43:43 -07:00
|
|
|
MACOSX_BUNDLE true
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
|
2018-01-26 01:26:45 -07:00
|
|
|
OUTPUT_NAME Dolphin
|
2017-03-01 05:43:43 -07:00
|
|
|
)
|
2016-05-04 00:25:53 -06:00
|
|
|
|
2017-03-01 05:43:43 -07:00
|
|
|
# Copy qt.conf into the bundle
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf")
|
2017-03-01 05:43:43 -07:00
|
|
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
2017-02-03 17:10:59 -07:00
|
|
|
|
2018-02-24 13:12:22 -07:00
|
|
|
# Copy icon into the bundle
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Data/Dolphin.icns")
|
2018-02-24 13:12:22 -07:00
|
|
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/Dolphin.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
|
|
|
2017-03-01 05:43:43 -07:00
|
|
|
# Copy Qt plugins into the bundle
|
|
|
|
get_target_property(qtcocoa_location Qt5::QCocoaIntegrationPlugin LOCATION)
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE "${qtcocoa_location}")
|
2017-03-01 05:43:43 -07:00
|
|
|
set_source_files_properties("${qtcocoa_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/platforms)
|
2017-02-01 19:51:00 -07:00
|
|
|
|
2018-02-24 10:48:29 -07:00
|
|
|
get_target_property(qtmacstyle_location Qt5::QMacStylePlugin LOCATION)
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE "${qtmacstyle_location}")
|
2018-02-24 10:48:29 -07:00
|
|
|
set_source_files_properties("${qtmacstyle_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/styles)
|
|
|
|
|
2017-03-01 05:43:43 -07:00
|
|
|
# Copy resources into the bundle
|
|
|
|
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/Data/Sys")
|
|
|
|
file(GLOB_RECURSE resources RELATIVE "${CMAKE_SOURCE_DIR}/Data" "${CMAKE_SOURCE_DIR}/Data/Sys/*")
|
|
|
|
foreach(res ${resources})
|
2018-01-26 01:26:45 -07:00
|
|
|
target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Data/${res}")
|
2017-03-01 05:43:43 -07:00
|
|
|
get_filename_component(resdir "${res}" DIRECTORY)
|
|
|
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/${res}" PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION "Resources/${resdir}")
|
|
|
|
source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/Data/${res}")
|
|
|
|
endforeach()
|
2017-02-03 17:10:59 -07:00
|
|
|
|
2017-03-01 05:43:43 -07:00
|
|
|
# Update library references to make the bundle portable
|
|
|
|
include(DolphinPostprocessBundle)
|
2018-01-26 01:26:45 -07:00
|
|
|
dolphin_postprocess_bundle(dolphin-emu)
|
2016-05-04 00:25:53 -06:00
|
|
|
else()
|
2018-01-26 01:26:45 -07:00
|
|
|
install(TARGETS dolphin-emu RUNTIME DESTINATION ${bindir})
|
2016-05-04 00:25:53 -06:00
|
|
|
endif()
|