2019-05-11 22:41:45 +00:00
|
|
|
if (NOT Qt5_DIR AND MSVC)
|
|
|
|
set(Qt5_DIR "${CMAKE_SOURCE_DIR}/Externals/Qt5.11.1/5.11.1/msvc2017_64/lib/cmake/Qt5")
|
|
|
|
endif()
|
|
|
|
|
2018-07-09 07:17:33 +00:00
|
|
|
find_package(Qt5 5.9 REQUIRED COMPONENTS Gui Widgets)
|
2017-09-04 17:35:38 +00:00
|
|
|
|
2017-06-03 22:47:13 +00:00
|
|
|
set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES "")
|
2017-01-26 13:00:28 +00:00
|
|
|
message(STATUS "Found Qt version ${Qt5Core_VERSION}")
|
|
|
|
|
2015-11-27 08:33:07 +00:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
2018-01-26 08:26:45 +00:00
|
|
|
add_executable(dolphin-emu
|
2017-03-01 12:43:43 +00:00
|
|
|
AboutDialog.cpp
|
2018-03-26 02:17:47 +00:00
|
|
|
CheatsManager.cpp
|
2018-07-03 21:50:08 +00:00
|
|
|
DiscordHandler.cpp
|
2018-07-20 22:27:43 +00:00
|
|
|
DiscordJoinRequestDialog.cpp
|
2018-05-14 20:01:23 +00:00
|
|
|
FIFO/FIFOPlayerWindow.cpp
|
|
|
|
FIFO/FIFOAnalyzer.cpp
|
2017-06-06 11:49:49 +00:00
|
|
|
HotkeyScheduler.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
Host.cpp
|
|
|
|
Main.cpp
|
|
|
|
MainWindow.cpp
|
|
|
|
MenuBar.cpp
|
|
|
|
RenderWidget.cpp
|
|
|
|
Resources.cpp
|
2018-03-21 10:13:53 +00:00
|
|
|
SearchBar.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
Settings.cpp
|
|
|
|
ToolBar.cpp
|
2017-07-17 21:50:40 +00:00
|
|
|
Translation.cpp
|
2017-06-14 09:58:11 +00:00
|
|
|
WiiUpdate.cpp
|
|
|
|
WiiUpdate.h
|
2018-01-24 12:35:13 +00:00
|
|
|
Config/CheatCodeEditor.cpp
|
2018-01-01 20:01:58 +00:00
|
|
|
Config/ARCodeWidget.cpp
|
2017-09-10 17:10:45 +00:00
|
|
|
Config/CheatWarningWidget.cpp
|
2017-05-09 16:49:10 +00:00
|
|
|
Config/ControllersWindow.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
Config/FilesystemWidget.cpp
|
2018-07-13 10:56:58 +00:00
|
|
|
Config/GameConfigEdit.cpp
|
|
|
|
Config/GameConfigHighlighter.cpp
|
2018-03-01 12:12:31 +00:00
|
|
|
Config/GameConfigWidget.cpp
|
2017-09-10 17:10:45 +00:00
|
|
|
Config/GeckoCodeWidget.cpp
|
2017-06-15 23:42:12 +00: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 13:10:22 +00:00
|
|
|
Config/Graphics/GraphicsRadio.cpp
|
2017-06-15 23:42:12 +00:00
|
|
|
Config/Graphics/GraphicsSlider.cpp
|
|
|
|
Config/Graphics/GraphicsWidget.cpp
|
|
|
|
Config/Graphics/GraphicsWindow.cpp
|
2018-05-20 22:03:40 +00:00
|
|
|
Config/Graphics/PostProcessingConfigWindow.cpp
|
2017-06-15 23:43:14 +00:00
|
|
|
Config/Graphics/SoftwareRendererWidget.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
Config/InfoWidget.cpp
|
2017-08-27 22:10:06 +00:00
|
|
|
Config/LogConfigWidget.cpp
|
|
|
|
Config/LogWidget.cpp
|
2017-05-20 15:53:17 +00:00
|
|
|
Config/Mapping/GCKeyboardEmu.cpp
|
2018-01-04 18:38:09 +00:00
|
|
|
Config/Mapping/GCMicrophone.cpp
|
2017-05-20 15:53:17 +00:00
|
|
|
Config/Mapping/GCPadEmu.cpp
|
2017-11-05 01:45:37 +00:00
|
|
|
Config/Mapping/GCPadWiiUConfigDialog.cpp
|
2017-06-06 11:49:49 +00:00
|
|
|
Config/Mapping/Hotkey3D.cpp
|
2018-04-14 04:51:32 +00:00
|
|
|
Config/Mapping/HotkeyControllerProfile.cpp
|
2018-02-14 22:25:01 +00:00
|
|
|
Config/Mapping/HotkeyDebugging.cpp
|
2017-06-06 11:49:49 +00:00
|
|
|
Config/Mapping/HotkeyGeneral.cpp
|
|
|
|
Config/Mapping/HotkeyGraphics.cpp
|
|
|
|
Config/Mapping/HotkeyStates.cpp
|
2018-06-03 10:41:58 +00:00
|
|
|
Config/Mapping/HotkeyStatesOther.cpp
|
2017-06-06 11:49:49 +00:00
|
|
|
Config/Mapping/HotkeyTAS.cpp
|
|
|
|
Config/Mapping/HotkeyWii.cpp
|
2017-06-13 15:16:41 +00:00
|
|
|
Config/Mapping/IOWindow.cpp
|
2017-05-20 15:53:17 +00:00
|
|
|
Config/Mapping/MappingButton.cpp
|
2017-06-13 15:16:41 +00:00
|
|
|
Config/Mapping/MappingCommon.cpp
|
2018-02-07 17:16:15 +00:00
|
|
|
Config/Mapping/MappingIndicator.cpp
|
2017-05-20 15:53:17 +00: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 13:53:52 +00:00
|
|
|
Config/NewPatchDialog.cpp
|
|
|
|
Config/PatchesWidget.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
Config/PropertiesDialog.cpp
|
|
|
|
Config/SettingsWindow.cpp
|
2019-03-21 22:04:56 +00:00
|
|
|
Config/VerifyWidget.cpp
|
2017-10-03 16:43:44 +00:00
|
|
|
Debugger/BreakpointWidget.cpp
|
2018-02-14 22:25:01 +00:00
|
|
|
Debugger/CodeViewWidget.cpp
|
|
|
|
Debugger/CodeWidget.cpp
|
2018-04-09 13:31:20 +00:00
|
|
|
Debugger/JITWidget.cpp
|
2018-03-16 11:39:53 +00:00
|
|
|
Debugger/MemoryViewWidget.cpp
|
|
|
|
Debugger/MemoryWidget.cpp
|
2017-10-03 16:43:44 +00:00
|
|
|
Debugger/NewBreakpointDialog.cpp
|
2019-04-23 19:42:37 +00:00
|
|
|
Debugger/PatchInstructionDialog.cpp
|
2017-09-13 17:33:45 +00:00
|
|
|
Debugger/RegisterColumn.cpp
|
|
|
|
Debugger/RegisterWidget.cpp
|
2017-09-27 06:53:05 +00:00
|
|
|
Debugger/WatchWidget.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
GameList/GameList.cpp
|
|
|
|
GameList/GameListModel.cpp
|
|
|
|
GameList/GameTracker.cpp
|
2017-08-05 08:28:53 +00:00
|
|
|
GameList/GridProxyModel.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
GameList/ListProxyModel.cpp
|
2018-01-25 18:54:50 +00:00
|
|
|
GCMemcardManager.cpp
|
2017-06-27 05:44:10 +00:00
|
|
|
QtUtils/BlockUserInputFilter.cpp
|
2018-10-18 08:33:05 +00:00
|
|
|
NetPlay/ChunkedProgressDialog.cpp
|
2017-07-21 20:48:21 +00:00
|
|
|
NetPlay/GameListDialog.cpp
|
|
|
|
NetPlay/MD5Dialog.cpp
|
2019-03-30 13:50:57 +00:00
|
|
|
NetPlay/NetPlayBrowser.cpp
|
2017-07-21 20:48:21 +00:00
|
|
|
NetPlay/NetPlayDialog.cpp
|
|
|
|
NetPlay/NetPlaySetupDialog.cpp
|
|
|
|
NetPlay/PadMappingDialog.cpp
|
2017-05-31 07:16:23 +00:00
|
|
|
QtUtils/DoubleClickEventFilter.cpp
|
2017-05-31 06:08:14 +00:00
|
|
|
QtUtils/ElidedButton.cpp
|
2018-07-19 22:10:37 +00:00
|
|
|
QtUtils/FlowLayout.cpp
|
2019-03-04 19:48:40 +00:00
|
|
|
QtUtils/ModalMessageBox.cpp
|
2017-12-31 19:33:36 +00:00
|
|
|
QtUtils/ImageConverter.cpp
|
2017-06-15 01:49:56 +00:00
|
|
|
QtUtils/WindowActivationEventFilter.cpp
|
2018-03-26 06:13:15 +00:00
|
|
|
QtUtils/WinIconHelper.cpp
|
2018-03-17 15:07:51 +00:00
|
|
|
QtUtils/WrapInScrollArea.cpp
|
2018-01-27 13:35:02 +00:00
|
|
|
QtUtils/AspectRatioWidget.cpp
|
2019-03-31 02:49:57 +00:00
|
|
|
ResourcePackManager.cpp
|
2017-06-28 04:36:27 +00:00
|
|
|
Settings/AdvancedPane.cpp
|
2017-06-21 08:27:21 +00:00
|
|
|
Settings/AudioPane.cpp
|
2018-01-04 00:41:31 +00:00
|
|
|
Settings/GameCubePane.cpp
|
2017-05-04 04:19:51 +00:00
|
|
|
Settings/GeneralPane.cpp
|
2017-05-04 07:47:59 +00:00
|
|
|
Settings/InterfacePane.cpp
|
2017-05-31 08:08:04 +00:00
|
|
|
Settings/PathPane.cpp
|
2017-07-21 09:22:01 +00:00
|
|
|
Settings/WiiPane.cpp
|
|
|
|
Settings/USBDeviceAddToWhitelistDialog.cpp
|
2018-01-27 13:35:02 +00:00
|
|
|
TAS/GCTASInputWindow.cpp
|
2018-01-31 11:35:09 +00:00
|
|
|
TAS/WiiTASInputWindow.cpp
|
2019-03-31 02:49:57 +00:00
|
|
|
TAS/TASCheckBox.cpp
|
2018-07-07 05:51:34 +00:00
|
|
|
TAS/TASInputWindow.cpp
|
2018-01-27 13:35:02 +00:00
|
|
|
TAS/StickWidget.cpp
|
2018-02-06 11:10:28 +00:00
|
|
|
TAS/IRWidget.cpp
|
2018-03-22 11:20:15 +00:00
|
|
|
Updater.cpp
|
2017-03-01 12:43:43 +00:00
|
|
|
)
|
2015-11-27 08:33:07 +00:00
|
|
|
|
2019-05-08 19:10:41 +00:00
|
|
|
if (NOT WIN32)
|
|
|
|
target_sources(dolphin-emu PRIVATE QtUtils/SignalDaemon.cpp)
|
|
|
|
endif()
|
|
|
|
|
2018-01-26 08:26:45 +00:00
|
|
|
target_compile_definitions(dolphin-emu
|
2018-04-05 11:52:21 +00:00
|
|
|
PRIVATE
|
|
|
|
-DQT_USE_QSTRINGBUILDER
|
|
|
|
-DQT_NO_CAST_FROM_ASCII
|
|
|
|
-DQT_NO_CAST_TO_ASCII
|
|
|
|
)
|
|
|
|
|
2018-01-26 08:26:45 +00:00
|
|
|
target_include_directories(dolphin-emu
|
2018-04-05 11:52:21 +00:00
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${Qt5Gui_PRIVATE_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2018-01-26 08:26:45 +00:00
|
|
|
target_link_libraries(dolphin-emu
|
2018-04-02 16:32:28 +00:00
|
|
|
PRIVATE
|
|
|
|
core
|
|
|
|
Qt5::Widgets
|
|
|
|
uicommon
|
2018-10-10 11:41:52 +00:00
|
|
|
imgui
|
2018-04-02 16:32:28 +00:00
|
|
|
)
|
2015-11-27 08:33:07 +00:00
|
|
|
|
2017-02-10 07:46:23 +00:00
|
|
|
if(WIN32)
|
2019-05-08 21:55:44 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE DolphinQt.manifest DolphinQt.rc)
|
|
|
|
|
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
set(Dolphin_NAME "DolphinD")
|
|
|
|
else()
|
|
|
|
set(Dolphin_NAME "Dolphin")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set_target_properties(dolphin-emu PROPERTIES
|
|
|
|
WIN32_EXECUTABLE TRUE
|
|
|
|
OUTPUT_NAME ${Dolphin_NAME}
|
|
|
|
)
|
|
|
|
|
2019-05-08 22:18:09 +00:00
|
|
|
target_compile_options(dolphin-emu PRIVATE "-D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING")
|
|
|
|
|
2019-05-08 21:55:44 +00:00
|
|
|
# Copy Sys dir
|
2019-05-15 08:18:28 +00:00
|
|
|
add_custom_command(TARGET dolphin-emu POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/Data/Sys" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Sys"
|
|
|
|
)
|
2019-05-08 21:55:44 +00:00
|
|
|
|
|
|
|
# Copy qt.conf
|
2019-05-15 08:18:28 +00:00
|
|
|
add_custom_command(TARGET dolphin-emu POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf.win" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/qt.conf"
|
|
|
|
)
|
|
|
|
|
|
|
|
# Create QtPlugins directory
|
|
|
|
add_custom_command(TARGET dolphin-emu POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/QtPlugins"
|
|
|
|
)
|
2019-05-08 21:55:44 +00:00
|
|
|
|
|
|
|
# Copy plugins
|
|
|
|
set (Qt5_PLUGINS_DIR "${Qt5_DIR}/../../../plugins")
|
|
|
|
file(GLOB_RECURSE plugins RELATIVE "${Qt5_PLUGINS_DIR}" "${Qt5_PLUGINS_DIR}/*.dll")
|
|
|
|
|
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
list(FILTER plugins INCLUDE REGEX ".*d.dll")
|
|
|
|
else()
|
|
|
|
list(FILTER plugins EXCLUDE REGEX ".*d.dll")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
foreach(plugin ${plugins})
|
2019-05-15 08:18:28 +00:00
|
|
|
add_custom_command(TARGET dolphin-emu POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${Qt5_PLUGINS_DIR}/${plugin}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/QtPlugins/${plugin}"
|
|
|
|
)
|
2019-05-08 21:55:44 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# Copy DLLs
|
|
|
|
set (Qt5_DLL_DIR "${Qt5_DIR}/../../../bin")
|
|
|
|
|
|
|
|
file(GLOB_RECURSE dlls RELATIVE "${Qt5_DLL_DIR}" "${Qt5_DLL_DIR}/*.dll")
|
|
|
|
|
|
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
list(FILTER dlls INCLUDE REGEX ".*d.dll")
|
|
|
|
else()
|
|
|
|
list(FILTER dlls EXCLUDE REGEX ".*d.dll")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
foreach(dll ${dlls})
|
2019-05-15 08:18:28 +00:00
|
|
|
add_custom_command(TARGET dolphin-emu POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${Qt5_DLL_DIR}/${dll}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
|
|
|
)
|
2019-05-08 21:55:44 +00:00
|
|
|
endforeach()
|
|
|
|
|
2017-02-10 07:46:23 +00:00
|
|
|
endif()
|
|
|
|
|
2017-07-17 21:50:40 +00:00
|
|
|
# Handle localization
|
|
|
|
find_package(Gettext)
|
2019-05-08 21:55:44 +00:00
|
|
|
|
|
|
|
if(WIN32 AND NOT Gettext_FOUND)
|
|
|
|
message(STATUS "Using Gettext from Externals")
|
|
|
|
set(GETTEXT_MSGFMT_EXECUTABLE "${CMAKE_SOURCE_DIR}/Externals/gettext/msgfmt.exe")
|
|
|
|
endif()
|
|
|
|
|
2019-05-15 08:19:07 +00:00
|
|
|
if(GETTEXT_MSGFMT_EXECUTABLE)
|
2017-07-17 21:50:40 +00:00
|
|
|
set(pot_file "${CMAKE_SOURCE_DIR}/Languages/po/dolphin-emu.pot")
|
|
|
|
file(GLOB LINGUAS ${CMAKE_SOURCE_DIR}/Languages/po/*.po)
|
|
|
|
|
2018-01-26 08:26:45 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE ${pot_file} ${LINGUAS})
|
2017-07-17 21:50:40 +00: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 08:26:45 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE ${mo})
|
2017-07-17 21:50:40 +00: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()
|
|
|
|
|
2019-05-08 21:55:44 +00:00
|
|
|
if(WIN32)
|
|
|
|
add_custom_command(OUTPUT ${mo}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${mo_dir}
|
|
|
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${mo} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Languages/${lang}/dolphin-emu.mo
|
|
|
|
DEPENDS ${po}
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
add_custom_command(OUTPUT ${mo}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${mo_dir}
|
|
|
|
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${po} ${pot_file}
|
|
|
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
|
|
|
|
DEPENDS ${po}
|
|
|
|
)
|
|
|
|
endif()
|
2017-07-17 21:50:40 +00:00
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
2016-05-04 06:25:53 +00:00
|
|
|
if(APPLE)
|
2017-03-01 12:43:43 +00:00
|
|
|
include(BundleUtilities)
|
2018-01-26 08:26:45 +00:00
|
|
|
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Dolphin.app)
|
2016-05-04 06:25:53 +00:00
|
|
|
|
2017-03-01 12:43:43 +00:00
|
|
|
# Ask for an application bundle.
|
2018-01-26 08:26:45 +00:00
|
|
|
set_target_properties(dolphin-emu PROPERTIES
|
2017-03-01 12:43:43 +00:00
|
|
|
MACOSX_BUNDLE true
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
|
2018-01-26 08:26:45 +00:00
|
|
|
OUTPUT_NAME Dolphin
|
2017-03-01 12:43:43 +00:00
|
|
|
)
|
2016-05-04 06:25:53 +00:00
|
|
|
|
2017-03-01 12:43:43 +00:00
|
|
|
# Copy qt.conf into the bundle
|
2018-01-26 08:26:45 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qt.conf")
|
2017-03-01 12:43:43 +00:00
|
|
|
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/qt.conf" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
2017-02-04 00:10:59 +00:00
|
|
|
|
2018-02-24 20:12:22 +00:00
|
|
|
# Copy icon into the bundle
|
2018-01-26 08:26:45 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Data/Dolphin.icns")
|
2018-02-24 20:12:22 +00:00
|
|
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/Dolphin.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
|
|
|
|
2017-03-01 12:43:43 +00:00
|
|
|
# Copy Qt plugins into the bundle
|
|
|
|
get_target_property(qtcocoa_location Qt5::QCocoaIntegrationPlugin LOCATION)
|
2018-01-26 08:26:45 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE "${qtcocoa_location}")
|
2017-03-01 12:43:43 +00:00
|
|
|
set_source_files_properties("${qtcocoa_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/platforms)
|
2017-02-02 02:51:00 +00:00
|
|
|
|
2018-02-24 17:48:29 +00:00
|
|
|
get_target_property(qtmacstyle_location Qt5::QMacStylePlugin LOCATION)
|
2018-01-26 08:26:45 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE "${qtmacstyle_location}")
|
2018-02-24 17:48:29 +00:00
|
|
|
set_source_files_properties("${qtmacstyle_location}" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS/styles)
|
|
|
|
|
2017-03-01 12:43:43 +00: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 08:26:45 +00:00
|
|
|
target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Data/${res}")
|
2017-03-01 12:43:43 +00: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-04 00:10:59 +00:00
|
|
|
|
2018-12-01 04:35:45 +00:00
|
|
|
# Copy MoltenVK into the bundle
|
|
|
|
target_sources(dolphin-emu PRIVATE "${CMAKE_SOURCE_DIR}/Externals/MoltenVK/libvulkan.dylib")
|
|
|
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/Externals/MoltenVK/libvulkan.dylib" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks)
|
|
|
|
|
2017-03-01 12:43:43 +00:00
|
|
|
# Update library references to make the bundle portable
|
|
|
|
include(DolphinPostprocessBundle)
|
2018-01-26 08:26:45 +00:00
|
|
|
dolphin_postprocess_bundle(dolphin-emu)
|
2016-05-04 06:25:53 +00:00
|
|
|
else()
|
2018-01-26 08:26:45 +00:00
|
|
|
install(TARGETS dolphin-emu RUNTIME DESTINATION ${bindir})
|
2016-05-04 06:25:53 +00:00
|
|
|
endif()
|
2018-06-08 20:56:11 +00:00
|
|
|
|
|
|
|
if(USE_DISCORD_PRESENCE)
|
|
|
|
target_compile_definitions(dolphin-emu PRIVATE -DUSE_DISCORD_PRESENCE)
|
|
|
|
endif()
|