2015-11-27 01:33:07 -07:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
add_definitions(-DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
|
|
|
set(SRCS
|
2016-02-11 04:59:44 -07:00
|
|
|
AboutDialog.cpp
|
2015-12-19 22:24:48 -07:00
|
|
|
Host.cpp
|
2016-07-12 23:52:45 -06:00
|
|
|
InDevelopmentWarning.cpp
|
2015-11-27 01:33:07 -07:00
|
|
|
Main.cpp
|
|
|
|
MainWindow.cpp
|
2015-12-19 22:24:48 -07:00
|
|
|
MenuBar.cpp
|
2015-11-27 01:33:07 -07:00
|
|
|
RenderWidget.cpp
|
|
|
|
Resources.cpp
|
2015-12-20 16:36:39 -07:00
|
|
|
Settings.cpp
|
2015-12-03 21:41:17 -07:00
|
|
|
ToolBar.cpp
|
2016-02-29 01:52:15 -07:00
|
|
|
Config/FilesystemWidget.cpp
|
|
|
|
Config/InfoWidget.cpp
|
2015-12-30 20:03:13 -07:00
|
|
|
Config/PathDialog.cpp
|
2016-02-29 01:52:15 -07:00
|
|
|
Config/PropertiesDialog.cpp
|
2016-05-09 07:34:07 -06:00
|
|
|
Config/SettingsWindow.cpp
|
2015-11-27 01:33:07 -07:00
|
|
|
GameList/GameFile.cpp
|
|
|
|
GameList/GameList.cpp
|
|
|
|
GameList/GameListModel.cpp
|
2015-12-19 22:24:48 -07:00
|
|
|
GameList/GameTracker.cpp
|
2015-12-03 21:41:17 -07:00
|
|
|
GameList/ListProxyModel.cpp
|
2016-02-17 22:12:24 -07:00
|
|
|
GameList/TableDelegate.cpp
|
2015-11-27 01:33:07 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND LIBS core uicommon)
|
|
|
|
|
|
|
|
set(DOLPHINQT2_BINARY dolphin-emu-qt2)
|
|
|
|
|
|
|
|
add_executable(${DOLPHINQT2_BINARY} ${SRCS} ${UI_HEADERS})
|
|
|
|
target_link_libraries(${DOLPHINQT2_BINARY} ${LIBS} Qt5::Widgets)
|
|
|
|
|
2016-05-04 00:25:53 -06:00
|
|
|
if(APPLE)
|
|
|
|
# Note: This is copied from DolphinQt, based on the DolphinWX version.
|
|
|
|
|
|
|
|
include(BundleUtilities)
|
|
|
|
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DOLPHINQT2_BINARY}.app)
|
|
|
|
|
|
|
|
# Ask for an application bundle.
|
|
|
|
set_target_properties(${DOLPHINQT2_BINARY} PROPERTIES
|
|
|
|
MACOSX_BUNDLE true
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
|
|
|
|
)
|
|
|
|
|
|
|
|
# get rid of any old copies
|
|
|
|
file (REMOVE_RECURSE ${BUNDLE_PATH}/Contents/Resources/Sys)
|
|
|
|
if(NOT SKIP_POSTPROCESS_BUNDLE)
|
|
|
|
# Fix up the bundle after it is finished.
|
|
|
|
# There does not seem to be an easy way to run CMake commands post-build,
|
|
|
|
# so we invoke CMake again on a generated script.
|
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/postprocess_bundle.cmake "
|
|
|
|
include(BundleUtilities)
|
|
|
|
message(\"Fixing up application bundle: ${BUNDLE_PATH}\")
|
|
|
|
message(\"(Note: This is only necessary to produce a redistributable binary.\")
|
|
|
|
message(\"To skip, pass -DSKIP_POSTPROCESS_BUNDLE=1 to cmake.)\")
|
|
|
|
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
2016-09-28 11:22:36 -06:00
|
|
|
execute_process(
|
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/Tools/deploy-mac.py -p platforms/libqcocoa.dylib \"${BUNDLE_PATH}\"
|
|
|
|
RESULT_VARIABLE retcode
|
|
|
|
)
|
|
|
|
if(NOT \${retcode} EQUAL 0)
|
|
|
|
message(FATAL_ERROR \"Error when postprocessing bundle (return code: \${retcode}).\")
|
|
|
|
endif()
|
2016-05-04 00:25:53 -06:00
|
|
|
file(INSTALL ${CMAKE_SOURCE_DIR}/Data/Sys
|
|
|
|
DESTINATION ${BUNDLE_PATH}/Contents/Resources
|
|
|
|
)
|
|
|
|
")
|
|
|
|
add_custom_command(TARGET ${DOLPHINQT2_BINARY} POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P postprocess_bundle.cmake
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
add_custom_command(OUTPUT ${BUNDLE_PATH}/Contents/Resources/Sys
|
|
|
|
COMMAND ln -nfs ${CMAKE_SOURCE_DIR}/Data/Sys ${BUNDLE_PATH}/Contents/Resources/Sys
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
add_custom_target(CopyDataIntoBundleQt ALL
|
|
|
|
DEPENDS ${BUNDLE_PATH}/Contents/Resources/Sys
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
install(TARGETS ${DOLPHINQT2_BINARY} RUNTIME DESTINATION ${bindir})
|
|
|
|
endif()
|