2014-08-06 15:32:41 -04:00
|
|
|
set(GUI_SRCS
|
|
|
|
AboutDolphin.cpp
|
2014-11-22 16:39:48 -05:00
|
|
|
ControllerConfigDiag.cpp
|
2016-07-23 01:05:04 +00:00
|
|
|
Cheats/ActionReplayCodesPanel.cpp
|
|
|
|
Cheats/ARCodeAddEdit.cpp
|
2014-10-18 17:32:50 -04:00
|
|
|
Cheats/CheatSearchTab.cpp
|
|
|
|
Cheats/CheatsWindow.cpp
|
|
|
|
Cheats/CreateCodeDialog.cpp
|
|
|
|
Cheats/GeckoCodeDiag.cpp
|
2015-03-18 18:00:27 -04:00
|
|
|
Config/AdvancedConfigPane.cpp
|
|
|
|
Config/AudioConfigPane.cpp
|
|
|
|
Config/ConfigMain.cpp
|
|
|
|
Config/GameCubeConfigPane.cpp
|
2015-12-31 11:09:47 -06:00
|
|
|
Config/GCAdapterConfigDiag.cpp
|
2015-03-18 18:00:27 -04:00
|
|
|
Config/GeneralConfigPane.cpp
|
|
|
|
Config/InterfaceConfigPane.cpp
|
|
|
|
Config/PathConfigPane.cpp
|
|
|
|
Config/WiiConfigPane.cpp
|
2014-08-06 15:32:41 -04: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 21:45:40 +11:00
|
|
|
Debugger/WatchView.cpp
|
|
|
|
Debugger/WatchWindow.cpp
|
2016-12-04 02:04:35 -05:00
|
|
|
ISOProperties/FilesystemPanel.cpp
|
2016-11-12 20:51:08 -05:00
|
|
|
ISOProperties/InfoPanel.cpp
|
|
|
|
ISOProperties/ISOProperties.cpp
|
2015-04-11 01:24:45 -04:00
|
|
|
NetPlay/ChangeGameDialog.cpp
|
2016-07-14 00:45:38 +02:00
|
|
|
NetPlay/MD5Dialog.cpp
|
2016-10-03 05:35:27 -07:00
|
|
|
NetPlay/NetPlayLauncher.cpp
|
2015-04-11 01:24:45 -04:00
|
|
|
NetPlay/NetPlaySetupFrame.cpp
|
|
|
|
NetPlay/NetWindow.cpp
|
|
|
|
NetPlay/PadMapDialog.cpp
|
2016-11-18 02:03:06 -05:00
|
|
|
Input/InputConfigDiag.cpp
|
|
|
|
Input/InputConfigDiagBitmaps.cpp
|
2016-11-18 19:54:06 -05:00
|
|
|
Input/HotkeyInputConfigDiag.cpp
|
|
|
|
Input/GCPadInputConfigDiag.cpp
|
2016-12-04 16:28:44 -05:00
|
|
|
Input/MicButtonConfigDiag.cpp
|
2016-11-18 19:54:06 -05: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 15:32:41 -04:00
|
|
|
FifoPlayerDlg.cpp
|
|
|
|
Frame.cpp
|
|
|
|
FrameAui.cpp
|
|
|
|
FrameTools.cpp
|
|
|
|
GameListCtrl.cpp
|
|
|
|
ISOFile.cpp
|
|
|
|
LogConfigWindow.cpp
|
|
|
|
LogWindow.cpp
|
|
|
|
Main.cpp
|
2016-10-14 14:52:18 -04:00
|
|
|
MainMenuBar.cpp
|
2016-10-21 21:41:17 -04:00
|
|
|
MainToolBar.cpp
|
2014-08-06 15:32:41 -04:00
|
|
|
MemcardManager.cpp
|
|
|
|
PatchAddEdit.cpp
|
2014-07-29 12:14:25 -05:00
|
|
|
PostProcessingConfigDiag.cpp
|
2014-08-06 15:32:41 -04:00
|
|
|
SoftwareVideoConfigDialog.cpp
|
|
|
|
TASInputDlg.cpp
|
|
|
|
VideoConfigDiag.cpp
|
2016-11-05 08:29:29 -04:00
|
|
|
WxEventUtils.cpp
|
2014-08-06 15:32:41 -04:00
|
|
|
WXInputBase.cpp
|
|
|
|
WxUtils.cpp)
|
2010-11-01 15:47:02 +00:00
|
|
|
|
2014-11-24 20:26:33 -05: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-10 22:15:11 -07:00
|
|
|
set(WXLIBS ${wxWidgets_LIBRARIES})
|
|
|
|
|
2016-07-17 03:54:31 -06:00
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
2015-06-10 22:15:11 -07:00
|
|
|
set(WXLIBS ${WXLIBS} dl)
|
|
|
|
endif()
|
2014-08-06 15:32:41 -04:00
|
|
|
|
2014-11-19 19:55:52 -05:00
|
|
|
list(APPEND LIBS core uicommon)
|
|
|
|
|
2015-01-03 13:17:57 +01:00
|
|
|
if(APPLE)
|
2011-12-07 08:26:44 +01:00
|
|
|
if(wxWidgets_FOUND)
|
2014-11-19 19:55:52 -05:00
|
|
|
list(APPEND WXLIBS
|
2011-12-07 08:26:44 +01:00
|
|
|
${APPSERV_LIBRARY}
|
|
|
|
${COCOA_LIBRARY}
|
|
|
|
)
|
|
|
|
endif()
|
2011-12-11 16:07:59 +01: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 04:51:37 +01:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND SRCS DolphinWX.rc)
|
|
|
|
endif()
|
|
|
|
|
2015-01-03 13:17:57 +01:00
|
|
|
if(APPLE)
|
2011-12-11 16:07:59 +01:00
|
|
|
set(DOLPHIN_EXE_BASE Dolphin)
|
|
|
|
else()
|
|
|
|
set(DOLPHIN_EXE_BASE dolphin-emu)
|
|
|
|
endif()
|
2014-08-06 15:32:41 -04:00
|
|
|
|
|
|
|
set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE})
|
2011-02-13 06:06:32 +00:00
|
|
|
|
2013-08-30 01:35:43 -04:00
|
|
|
|
2016-01-06 15:35:15 -06:00
|
|
|
if(wxWidgets_FOUND)
|
2014-08-06 15:32:41 -04:00
|
|
|
add_executable(${DOLPHIN_EXE} ${SRCS} ${GUI_SRCS})
|
2014-11-19 19:55:52 -05:00
|
|
|
target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS})
|
2017-02-02 03:39:39 +01: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 13:17:57 +01:00
|
|
|
if(APPLE)
|
2013-02-26 13:49:00 -06:00
|
|
|
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DOLPHIN_EXE}.app)
|
2011-12-12 01:30:42 +01:00
|
|
|
|
2013-02-26 13:49:00 -06: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 01:30:42 +01:00
|
|
|
)
|
2013-02-26 13:49:00 -06:00
|
|
|
|
2017-02-02 03:51:00 +01: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 01:35:43 -04:00
|
|
|
|
2017-02-02 03:51:00 +01:00
|
|
|
# Update library references to make the bundle portable
|
|
|
|
add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD
|
|
|
|
COMMAND echo "Fixing up application bundle: ${BUNDLE_PATH}"
|
2017-02-03 09:22:30 -08:00
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py $<TARGET_FILE_DIR:${DOLPHIN_EXE}>/../..
|
2017-02-02 03:51:00 +01:00
|
|
|
)
|
2013-08-30 01:35:43 -04:00
|
|
|
|
2011-12-14 02:50:36 +01:00
|
|
|
|
2013-02-26 13:49:00 -06:00
|
|
|
# Install bundle into systemwide /Applications directory.
|
2017-02-02 03:51:00 +01:00
|
|
|
install(TARGETS ${DOLPHIN_EXE} DESTINATION /Applications)
|
2017-01-20 23:04:46 +01:00
|
|
|
elseif(WIN32)
|
|
|
|
set_target_properties(${DOLPHIN_EXE} PROPERTIES
|
|
|
|
WIN32_EXECUTABLE ON
|
|
|
|
)
|
2017-02-03 04:52:22 +01: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 13:49:00 -06:00
|
|
|
else()
|
|
|
|
install(TARGETS ${DOLPHIN_EXE} RUNTIME DESTINATION ${bindir})
|
|
|
|
endif()
|
2014-08-06 15:32:41 -04:00
|
|
|
|
|
|
|
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} ${DOLPHIN_EXE})
|
2011-12-11 16:07:59 +01:00
|
|
|
endif()
|
2012-12-22 12:51:01 +01:00
|
|
|
|
2016-01-26 07:35:17 -06:00
|
|
|
if(USE_X11 OR ENABLE_HEADLESS)
|
2014-08-06 15:32:41 -04: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 15:32:41 -04:00
|
|
|
endif()
|