CMakeLists.txt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. add_subdirectory(AudioCommon)
  2. add_subdirectory(Common)
  3. add_subdirectory(Core)
  4. add_subdirectory(DiscIO)
  5. add_subdirectory(InputCommon)
  6. add_subdirectory(UICommon)
  7. add_subdirectory(VideoCommon)
  8. add_subdirectory(VideoBackends)
  9. if(ENABLE_NOGUI)
  10. add_subdirectory(DolphinNoGUI)
  11. endif()
  12. if(ENABLE_CLI_TOOL)
  13. add_subdirectory(DolphinTool)
  14. endif()
  15. if(ENABLE_QT)
  16. add_subdirectory(DolphinQt)
  17. endif()
  18. if (APPLE OR WIN32)
  19. add_subdirectory(UpdaterCommon)
  20. endif()
  21. if (APPLE AND ENABLE_AUTOUPDATE)
  22. add_subdirectory(MacUpdater)
  23. endif()
  24. if (WIN32 AND ENABLE_AUTOUPDATE)
  25. add_subdirectory(WinUpdater)
  26. endif()
  27. if (APPLE AND ENABLE_QT)
  28. set(DOLPHIN_MAC_BUNDLE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Dolphin.app")
  29. add_custom_target(build_final_bundle ALL
  30. COMMAND ${CMAKE_COMMAND} -E remove_directory
  31. ${DOLPHIN_MAC_BUNDLE}
  32. COMMAND cp -R
  33. ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DolphinQt.app
  34. ${DOLPHIN_MAC_BUNDLE}
  35. # HACK: The Updater does not support setting the executable bit on new files,
  36. # so don't use the new executable name, and instead continue to use "Dolphin".
  37. COMMAND ${CMAKE_COMMAND} -E rename
  38. ${DOLPHIN_MAC_BUNDLE}/Contents/MacOS/DolphinQt
  39. ${DOLPHIN_MAC_BUNDLE}/Contents/MacOS/Dolphin
  40. COMMAND plutil
  41. -replace CFBundleExecutable -string Dolphin
  42. ${DOLPHIN_MAC_BUNDLE}/Contents/Info.plist
  43. DEPENDS dolphin-emu)
  44. if (ENABLE_AUTOUPDATE)
  45. add_dependencies(build_final_bundle MacUpdater)
  46. add_custom_command(TARGET build_final_bundle
  47. POST_BUILD
  48. COMMAND ${CMAKE_COMMAND} -E make_directory
  49. "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers"
  50. COMMAND cp -R
  51. "$<TARGET_BUNDLE_DIR:MacUpdater>"
  52. "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers/Dolphin Updater.app")
  53. if (MACOS_CODE_SIGNING)
  54. add_custom_command(TARGET build_final_bundle
  55. POST_BUILD
  56. COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh"
  57. "-t"
  58. "${MACOS_CODE_SIGNING_IDENTITY}"
  59. "${DOLPHIN_MAC_BUNDLE}/Contents/Helpers/Dolphin Updater.app")
  60. endif()
  61. endif()
  62. if (MACOS_CODE_SIGNING)
  63. add_custom_command(TARGET build_final_bundle
  64. POST_BUILD
  65. COMMAND "${CMAKE_SOURCE_DIR}/Tools/mac-codesign.sh"
  66. "-t"
  67. "-e" "${CMAKE_SOURCE_DIR}/Source/Core/DolphinQt/DolphinEmu$<$<CONFIG:Debug>:Debug>.entitlements"
  68. "${MACOS_CODE_SIGNING_IDENTITY}"
  69. "${DOLPHIN_MAC_BUNDLE}")
  70. endif()
  71. endif()