CMakeLists.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. set(CMAKE_AUTOMOC ON)
  2. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  3. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
  4. set(SRCS
  5. configuration/config.cpp
  6. configuration/configure_audio.cpp
  7. configuration/configure_debug.cpp
  8. configuration/configure_dialog.cpp
  9. configuration/configure_general.cpp
  10. configuration/configure_graphics.cpp
  11. configuration/configure_input.cpp
  12. configuration/configure_system.cpp
  13. debugger/graphics/graphics.cpp
  14. debugger/graphics/graphics_breakpoint_observer.cpp
  15. debugger/graphics/graphics_breakpoints.cpp
  16. debugger/graphics/graphics_cmdlists.cpp
  17. debugger/graphics/graphics_surface.cpp
  18. debugger/graphics/graphics_tracing.cpp
  19. debugger/graphics/graphics_vertex_shader.cpp
  20. debugger/profiler.cpp
  21. debugger/registers.cpp
  22. debugger/wait_tree.cpp
  23. util/spinbox.cpp
  24. util/util.cpp
  25. bootmanager.cpp
  26. game_list.cpp
  27. hotkeys.cpp
  28. main.cpp
  29. ui_settings.cpp
  30. citra-qt.rc
  31. Info.plist
  32. )
  33. set(HEADERS
  34. configuration/config.h
  35. configuration/configure_audio.h
  36. configuration/configure_debug.h
  37. configuration/configure_dialog.h
  38. configuration/configure_general.h
  39. configuration/configure_graphics.h
  40. configuration/configure_input.h
  41. configuration/configure_system.h
  42. debugger/graphics/graphics.h
  43. debugger/graphics/graphics_breakpoint_observer.h
  44. debugger/graphics/graphics_breakpoints.h
  45. debugger/graphics/graphics_breakpoints_p.h
  46. debugger/graphics/graphics_cmdlists.h
  47. debugger/graphics/graphics_surface.h
  48. debugger/graphics/graphics_tracing.h
  49. debugger/graphics/graphics_vertex_shader.h
  50. debugger/profiler.h
  51. debugger/registers.h
  52. debugger/wait_tree.h
  53. util/spinbox.h
  54. util/util.h
  55. bootmanager.h
  56. game_list.h
  57. game_list_p.h
  58. hotkeys.h
  59. main.h
  60. ui_settings.h
  61. )
  62. set(UIS
  63. configuration/configure.ui
  64. configuration/configure_audio.ui
  65. configuration/configure_debug.ui
  66. configuration/configure_general.ui
  67. configuration/configure_graphics.ui
  68. configuration/configure_input.ui
  69. configuration/configure_system.ui
  70. debugger/registers.ui
  71. hotkeys.ui
  72. main.ui
  73. )
  74. create_directory_groups(${SRCS} ${HEADERS} ${UIS})
  75. if (Qt5_FOUND)
  76. qt5_wrap_ui(UI_HDRS ${UIS})
  77. else()
  78. qt4_wrap_ui(UI_HDRS ${UIS})
  79. endif()
  80. if (APPLE)
  81. set(MACOSX_ICON "../../dist/citra.icns")
  82. set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
  83. add_executable(citra-qt MACOSX_BUNDLE ${SRCS} ${HEADERS} ${UI_HDRS} ${MACOSX_ICON})
  84. set_target_properties(citra-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
  85. else()
  86. add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS})
  87. endif()
  88. target_link_libraries(citra-qt PRIVATE audio_core common core input_common video_core)
  89. target_link_libraries(citra-qt PRIVATE ${CITRA_QT_LIBS} Boost::boost glad)
  90. target_link_libraries(citra-qt PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
  91. if(UNIX AND NOT APPLE)
  92. install(TARGETS citra-qt RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
  93. endif()
  94. if (MSVC)
  95. include(CopyCitraQt5Deps)
  96. include(CopyCitraSDLDeps)
  97. copy_citra_Qt5_deps(citra-qt)
  98. copy_citra_SDL_deps(citra-qt)
  99. endif()