2014-08-06 19:32:41 +00:00
|
|
|
set(GUI_SRCS
|
|
|
|
AboutDolphin.cpp
|
2014-11-22 21:39:48 +00:00
|
|
|
ControllerConfigDiag.cpp
|
2016-07-23 01:05:04 +00:00
|
|
|
Cheats/ActionReplayCodesPanel.cpp
|
|
|
|
Cheats/ARCodeAddEdit.cpp
|
2014-10-18 21:32:50 +00:00
|
|
|
Cheats/CheatSearchTab.cpp
|
|
|
|
Cheats/CheatsWindow.cpp
|
|
|
|
Cheats/CreateCodeDialog.cpp
|
|
|
|
Cheats/GeckoCodeDiag.cpp
|
2016-10-31 20:51:35 +00:00
|
|
|
Config/AddUSBDeviceDiag.cpp
|
2015-03-18 22:00:27 +00:00
|
|
|
Config/AdvancedConfigPane.cpp
|
|
|
|
Config/AudioConfigPane.cpp
|
|
|
|
Config/ConfigMain.cpp
|
|
|
|
Config/GameCubeConfigPane.cpp
|
2015-12-31 17:09:47 +00:00
|
|
|
Config/GCAdapterConfigDiag.cpp
|
2015-03-18 22:00:27 +00:00
|
|
|
Config/GeneralConfigPane.cpp
|
|
|
|
Config/InterfaceConfigPane.cpp
|
|
|
|
Config/PathConfigPane.cpp
|
|
|
|
Config/WiiConfigPane.cpp
|
2014-08-06 19:32:41 +00:00
|
|
|
Debugger/BreakpointDlg.cpp
|
|
|
|
Debugger/BreakpointView.cpp
|
|
|
|
Debugger/BreakpointWindow.cpp
|
|
|
|
Debugger/CodeView.cpp
|
|
|
|
Debugger/CodeWindow.cpp
|
|
|
|
Debugger/CodeWindowFunctions.cpp
|
|
|
|
Debugger/DSPDebugWindow.cpp
|
|
|
|
Debugger/DSPRegisterView.cpp
|
|
|
|
Debugger/DebuggerPanel.cpp
|
|
|
|
Debugger/DebuggerUIUtil.cpp
|
|
|
|
Debugger/JitWindow.cpp
|
|
|
|
Debugger/MemoryCheckDlg.cpp
|
|
|
|
Debugger/MemoryView.cpp
|
|
|
|
Debugger/MemoryWindow.cpp
|
|
|
|
Debugger/RegisterView.cpp
|
|
|
|
Debugger/RegisterWindow.cpp
|
2014-10-19 10:45:40 +00:00
|
|
|
Debugger/WatchView.cpp
|
|
|
|
Debugger/WatchWindow.cpp
|
2016-12-04 07:04:35 +00:00
|
|
|
ISOProperties/FilesystemPanel.cpp
|
2016-11-13 01:51:08 +00:00
|
|
|
ISOProperties/InfoPanel.cpp
|
|
|
|
ISOProperties/ISOProperties.cpp
|
2015-04-11 05:24:45 +00:00
|
|
|
NetPlay/ChangeGameDialog.cpp
|
2016-07-13 22:45:38 +00:00
|
|
|
NetPlay/MD5Dialog.cpp
|
2016-10-03 12:35:27 +00:00
|
|
|
NetPlay/NetPlayLauncher.cpp
|
2015-04-11 05:24:45 +00:00
|
|
|
NetPlay/NetPlaySetupFrame.cpp
|
|
|
|
NetPlay/NetWindow.cpp
|
|
|
|
NetPlay/PadMapDialog.cpp
|
2016-11-18 07:03:06 +00:00
|
|
|
Input/InputConfigDiag.cpp
|
|
|
|
Input/InputConfigDiagBitmaps.cpp
|
2016-11-19 00:54:06 +00:00
|
|
|
Input/HotkeyInputConfigDiag.cpp
|
|
|
|
Input/GCPadInputConfigDiag.cpp
|
2016-12-04 21:28:44 +00:00
|
|
|
Input/MicButtonConfigDiag.cpp
|
2016-11-19 00:54:06 +00:00
|
|
|
Input/GCKeyboardInputConfigDiag.cpp
|
|
|
|
Input/WiimoteInputConfigDiag.cpp
|
|
|
|
Input/NunchukInputConfigDiag.cpp
|
|
|
|
Input/ClassicInputConfigDiag.cpp
|
|
|
|
Input/GuitarInputConfigDiag.cpp
|
|
|
|
Input/DrumsInputConfigDiag.cpp
|
|
|
|
Input/TurntableInputConfigDiag.cpp
|
2016-10-02 03:05:55 +00:00
|
|
|
DolphinSlider.cpp
|
2014-08-06 19:32:41 +00:00
|
|
|
FifoPlayerDlg.cpp
|
|
|
|
Frame.cpp
|
|
|
|
FrameAui.cpp
|
|
|
|
FrameTools.cpp
|
|
|
|
GameListCtrl.cpp
|
|
|
|
ISOFile.cpp
|
|
|
|
LogConfigWindow.cpp
|
|
|
|
LogWindow.cpp
|
|
|
|
Main.cpp
|
2016-10-14 18:52:18 +00:00
|
|
|
MainMenuBar.cpp
|
2016-10-22 01:41:17 +00:00
|
|
|
MainToolBar.cpp
|
2014-08-06 19:32:41 +00:00
|
|
|
MemcardManager.cpp
|
|
|
|
PatchAddEdit.cpp
|
2014-07-29 17:14:25 +00:00
|
|
|
PostProcessingConfigDiag.cpp
|
2014-08-06 19:32:41 +00:00
|
|
|
SoftwareVideoConfigDialog.cpp
|
|
|
|
TASInputDlg.cpp
|
|
|
|
VideoConfigDiag.cpp
|
2016-11-05 12:29:29 +00:00
|
|
|
WxEventUtils.cpp
|
2014-08-06 19:32:41 +00:00
|
|
|
WXInputBase.cpp
|
|
|
|
WxUtils.cpp)
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2014-11-25 01:26:33 +00:00
|
|
|
set(NOGUI_SRCS MainNoGUI.cpp)
|
|
|
|
|
|
|
|
if(USE_X11)
|
|
|
|
set(GUI_SRCS ${GUI_SRCS} X11Utils.cpp)
|
|
|
|
set(NOGUI_SRCS ${NOGUI_SRCS} X11Utils.cpp)
|
|
|
|
endif()
|
|
|
|
|
2015-06-11 05:15:11 +00:00
|
|
|
set(WXLIBS ${wxWidgets_LIBRARIES})
|
|
|
|
|
2016-07-17 09:54:31 +00:00
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
2015-06-11 05:15:11 +00:00
|
|
|
set(WXLIBS ${WXLIBS} dl)
|
|
|
|
endif()
|
2014-08-06 19:32:41 +00:00
|
|
|
|
2014-11-20 00:55:52 +00:00
|
|
|
list(APPEND LIBS core uicommon)
|
|
|
|
|
2015-01-03 12:17:57 +00:00
|
|
|
if(APPLE)
|
2011-12-07 07:26:44 +00:00
|
|
|
if(wxWidgets_FOUND)
|
2014-11-20 00:55:52 +00:00
|
|
|
list(APPEND WXLIBS
|
2011-12-07 07:26:44 +00:00
|
|
|
${APPSERV_LIBRARY}
|
|
|
|
${COCOA_LIBRARY}
|
|
|
|
)
|
|
|
|
endif()
|
2011-12-11 15:07:59 +00:00
|
|
|
# Add resource files to application bundle.
|
|
|
|
set(RESOURCES resources/Dolphin.icns)
|
|
|
|
list(APPEND SRCS ${RESOURCES})
|
|
|
|
set_source_files_properties(${RESOURCES} PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources)
|
2010-11-01 15:47:02 +00:00
|
|
|
endif()
|
|
|
|
|
2017-02-03 03:51:37 +00:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND SRCS DolphinWX.rc)
|
|
|
|
endif()
|
|
|
|
|
2015-01-03 12:17:57 +00:00
|
|
|
if(APPLE)
|
2011-12-11 15:07:59 +00:00
|
|
|
set(DOLPHIN_EXE_BASE Dolphin)
|
|
|
|
else()
|
|
|
|
set(DOLPHIN_EXE_BASE dolphin-emu)
|
|
|
|
endif()
|
2014-08-06 19:32:41 +00:00
|
|
|
|
|
|
|
set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE})
|
2011-02-13 06:06:32 +00:00
|
|
|
|
2013-08-30 05:35:43 +00:00
|
|
|
|
2016-01-06 21:35:15 +00:00
|
|
|
if(wxWidgets_FOUND)
|
2014-08-06 19:32:41 +00:00
|
|
|
add_executable(${DOLPHIN_EXE} ${SRCS} ${GUI_SRCS})
|
2014-11-20 00:55:52 +00:00
|
|
|
target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS})
|
2017-02-02 02:39:39 +00: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)
|
|
|
|
|
|
|
|
target_sources(${DOLPHIN_EXE} PRIVATE ${pot_file} ${LINGUAS})
|
|
|
|
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)
|
|
|
|
|
|
|
|
target_sources(${DOLPHIN_EXE} PRIVATE ${mo})
|
|
|
|
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}
|
|
|
|
COMMAND mkdir -p ${mo_dir}
|
|
|
|
COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${po} ${pot_file}
|
|
|
|
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${mo} ${po}
|
|
|
|
DEPENDS ${po}
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
2015-01-03 12:17:57 +00:00
|
|
|
if(APPLE)
|
2013-02-26 19:49:00 +00:00
|
|
|
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DOLPHIN_EXE}.app)
|
2011-12-12 00:30:42 +00:00
|
|
|
|
2013-02-26 19:49:00 +00:00
|
|
|
# Ask for an application bundle.
|
|
|
|
set_target_properties(${DOLPHIN_EXE} PROPERTIES
|
|
|
|
MACOSX_BUNDLE true
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
|
2011-12-12 00:30:42 +00:00
|
|
|
)
|
2013-02-26 19:49:00 +00:00
|
|
|
|
2017-02-02 02:51:00 +00:00
|
|
|
# Copy resources in the bundle
|
|
|
|
file(GLOB_RECURSE resources RELATIVE "${CMAKE_SOURCE_DIR}/Data" "${CMAKE_SOURCE_DIR}/Data/Sys/*")
|
|
|
|
foreach(res ${resources})
|
|
|
|
target_sources(${DOLPHIN_EXE} 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 "Resources/${resdir}")
|
|
|
|
source_group("Resources" FILES "${CMAKE_SOURCE_DIR}/Data/${res}")
|
|
|
|
endforeach()
|
2013-08-30 05:35:43 +00:00
|
|
|
|
2017-02-02 02:51:00 +00:00
|
|
|
# Update library references to make the bundle portable
|
2017-02-04 00:10:59 +00:00
|
|
|
include(DolphinPostprocessBundle)
|
|
|
|
dolphin_postprocess_bundle(${DOLPHIN_EXE})
|
2011-12-14 01:50:36 +00:00
|
|
|
|
2013-02-26 19:49:00 +00:00
|
|
|
# Install bundle into systemwide /Applications directory.
|
2017-02-02 02:51:00 +00:00
|
|
|
install(TARGETS ${DOLPHIN_EXE} DESTINATION /Applications)
|
2017-01-20 22:04:46 +00:00
|
|
|
elseif(WIN32)
|
|
|
|
set_target_properties(${DOLPHIN_EXE} PROPERTIES
|
|
|
|
WIN32_EXECUTABLE ON
|
|
|
|
)
|
2017-02-03 03:52:22 +00:00
|
|
|
add_custom_command(TARGET ${DOLPHIN_EXE}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Data/Sys $<TARGET_FILE_DIR:${DOLPHIN_EXE}>/Sys
|
|
|
|
)
|
2013-02-26 19:49:00 +00:00
|
|
|
else()
|
|
|
|
install(TARGETS ${DOLPHIN_EXE} RUNTIME DESTINATION ${bindir})
|
|
|
|
endif()
|
2014-08-06 19:32:41 +00:00
|
|
|
|
|
|
|
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} ${DOLPHIN_EXE})
|
2011-12-11 15:07:59 +00:00
|
|
|
endif()
|
2012-12-22 11:51:01 +00:00
|
|
|
|
2016-01-26 13:35:17 +00:00
|
|
|
if(USE_X11 OR ENABLE_HEADLESS)
|
2014-08-06 19:32:41 +00:00
|
|
|
set(DOLPHIN_NOGUI_EXE ${DOLPHIN_EXE_BASE}-nogui)
|
|
|
|
add_executable(${DOLPHIN_NOGUI_EXE} ${SRCS} ${NOGUI_SRCS})
|
|
|
|
target_link_libraries(${DOLPHIN_NOGUI_EXE} ${LIBS})
|
|
|
|
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} ${DOLPHIN_NOGUI_EXE})
|
2014-11-10 07:53:11 +00:00
|
|
|
install(TARGETS ${DOLPHIN_NOGUI_EXE} RUNTIME DESTINATION ${bindir})
|
2014-08-06 19:32:41 +00:00
|
|
|
endif()
|