CMakeLists.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. set(CMAKE_AUTOMOC ON)
  2. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  3. set(SRCS
  4. config/controller_config.cpp
  5. config/controller_config_util.cpp
  6. config.cpp
  7. debugger/callstack.cpp
  8. debugger/disassembler.cpp
  9. debugger/graphics.cpp
  10. debugger/graphics_breakpoint_observer.cpp
  11. debugger/graphics_breakpoints.cpp
  12. debugger/graphics_cmdlists.cpp
  13. debugger/graphics_framebuffer.cpp
  14. debugger/graphics_tracing.cpp
  15. debugger/graphics_vertex_shader.cpp
  16. debugger/profiler.cpp
  17. debugger/ramview.cpp
  18. debugger/registers.cpp
  19. util/spinbox.cpp
  20. util/util.cpp
  21. bootmanager.cpp
  22. configure_debug.cpp
  23. configure_dialog.cpp
  24. configure_general.cpp
  25. game_list.cpp
  26. hotkeys.cpp
  27. main.cpp
  28. ui_settings.cpp
  29. citra-qt.rc
  30. Info.plist
  31. )
  32. set(HEADERS
  33. config/controller_config.h
  34. config/controller_config_util.h
  35. config.h
  36. debugger/callstack.h
  37. debugger/disassembler.h
  38. debugger/graphics.h
  39. debugger/graphics_breakpoint_observer.h
  40. debugger/graphics_breakpoints.h
  41. debugger/graphics_breakpoints_p.h
  42. debugger/graphics_cmdlists.h
  43. debugger/graphics_framebuffer.h
  44. debugger/graphics_tracing.h
  45. debugger/graphics_vertex_shader.h
  46. debugger/profiler.h
  47. debugger/ramview.h
  48. debugger/registers.h
  49. util/spinbox.h
  50. util/util.h
  51. bootmanager.h
  52. configure_debug.h
  53. configure_dialog.h
  54. configure_general.h
  55. game_list.h
  56. game_list_p.h
  57. hotkeys.h
  58. main.h
  59. ui_settings.h
  60. version.h
  61. )
  62. set(UIS
  63. config/controller_config.ui
  64. debugger/callstack.ui
  65. debugger/disassembler.ui
  66. debugger/profiler.ui
  67. debugger/registers.ui
  68. configure.ui
  69. configure_debug.ui
  70. configure_general.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 core video_core audio_core common qhexedit)
  89. target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS})
  90. target_link_libraries(citra-qt ${PLATFORM_LIBRARIES} Threads::Threads)
  91. if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD")
  92. install(TARGETS citra-qt RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
  93. endif()
  94. if (Qt5_FOUND AND MSVC)
  95. include(WindowsCopyFiles)
  96. set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin")
  97. set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/")
  98. set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
  99. set(PLATFORMS ${DLL_DEST}platforms/)
  100. windows_copy_files(citra-qt ${Qt5_DLL_DIR} ${DLL_DEST}
  101. icudt*.dll
  102. icuin*.dll
  103. icuuc*.dll
  104. Qt5Core$<$<CONFIG:Debug>:d>.*
  105. Qt5Gui$<$<CONFIG:Debug>:d>.*
  106. Qt5OpenGL$<$<CONFIG:Debug>:d>.*
  107. Qt5Widgets$<$<CONFIG:Debug>:d>.*
  108. )
  109. windows_copy_files(citra-qt ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
  110. unset(Qt5_DLL_DIR)
  111. unset(Qt5_PLATFORMS_DIR)
  112. unset(DLL_DEST)
  113. unset(PLATFORMS)
  114. endif()