CMakeLists.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. set(CMAKE_AUTOMOC ON)
  2. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  3. set(SRCS
  4. config.cpp
  5. debugger/callstack.cpp
  6. debugger/disassembler.cpp
  7. debugger/graphics.cpp
  8. debugger/graphics_breakpoint_observer.cpp
  9. debugger/graphics_breakpoints.cpp
  10. debugger/graphics_cmdlists.cpp
  11. debugger/graphics_surface.cpp
  12. debugger/graphics_tracing.cpp
  13. debugger/graphics_vertex_shader.cpp
  14. debugger/profiler.cpp
  15. debugger/ramview.cpp
  16. debugger/registers.cpp
  17. debugger/wait_tree.cpp
  18. util/spinbox.cpp
  19. util/util.cpp
  20. bootmanager.cpp
  21. configure_audio.cpp
  22. configure_debug.cpp
  23. configure_dialog.cpp
  24. configure_general.cpp
  25. configure_graphics.cpp
  26. configure_system.cpp
  27. configure_input.cpp
  28. game_list.cpp
  29. hotkeys.cpp
  30. main.cpp
  31. ui_settings.cpp
  32. citra-qt.rc
  33. Info.plist
  34. )
  35. set(HEADERS
  36. config.h
  37. debugger/callstack.h
  38. debugger/disassembler.h
  39. debugger/graphics.h
  40. debugger/graphics_breakpoint_observer.h
  41. debugger/graphics_breakpoints.h
  42. debugger/graphics_breakpoints_p.h
  43. debugger/graphics_cmdlists.h
  44. debugger/graphics_surface.h
  45. debugger/graphics_tracing.h
  46. debugger/graphics_vertex_shader.h
  47. debugger/profiler.h
  48. debugger/ramview.h
  49. debugger/registers.h
  50. debugger/wait_tree.h
  51. util/spinbox.h
  52. util/util.h
  53. bootmanager.h
  54. configure_audio.h
  55. configure_debug.h
  56. configure_dialog.h
  57. configure_general.h
  58. configure_graphics.h
  59. configure_system.h
  60. configure_input.h
  61. game_list.h
  62. game_list_p.h
  63. hotkeys.h
  64. main.h
  65. ui_settings.h
  66. )
  67. set(UIS
  68. debugger/callstack.ui
  69. debugger/disassembler.ui
  70. debugger/profiler.ui
  71. debugger/registers.ui
  72. configure.ui
  73. configure_audio.ui
  74. configure_debug.ui
  75. configure_general.ui
  76. configure_graphics.ui
  77. configure_system.ui
  78. configure_input.ui
  79. hotkeys.ui
  80. main.ui
  81. )
  82. create_directory_groups(${SRCS} ${HEADERS} ${UIS})
  83. if (Qt5_FOUND)
  84. qt5_wrap_ui(UI_HDRS ${UIS})
  85. else()
  86. qt4_wrap_ui(UI_HDRS ${UIS})
  87. endif()
  88. if (APPLE)
  89. set(MACOSX_ICON "../../dist/citra.icns")
  90. set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
  91. add_executable(citra-qt MACOSX_BUNDLE ${SRCS} ${HEADERS} ${UI_HDRS} ${MACOSX_ICON})
  92. set_target_properties(citra-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
  93. else()
  94. add_executable(citra-qt ${SRCS} ${HEADERS} ${UI_HDRS})
  95. endif()
  96. target_link_libraries(citra-qt core video_core audio_core common qhexedit)
  97. target_link_libraries(citra-qt ${OPENGL_gl_LIBRARY} ${CITRA_QT_LIBS})
  98. target_link_libraries(citra-qt ${PLATFORM_LIBRARIES} Threads::Threads)
  99. if(UNIX AND NOT APPLE)
  100. install(TARGETS citra-qt RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
  101. endif()
  102. if (Qt5_FOUND AND MSVC)
  103. include(WindowsCopyFiles)
  104. set(Qt5_DLL_DIR "${Qt5_DIR}/../../../bin")
  105. set(Qt5_PLATFORMS_DIR "${Qt5_DIR}/../../../plugins/platforms/")
  106. set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$<CONFIG>/")
  107. set(PLATFORMS ${DLL_DEST}platforms/)
  108. windows_copy_files(citra-qt ${Qt5_DLL_DIR} ${DLL_DEST}
  109. icudt*.dll
  110. icuin*.dll
  111. icuuc*.dll
  112. Qt5Core$<$<CONFIG:Debug>:d>.*
  113. Qt5Gui$<$<CONFIG:Debug>:d>.*
  114. Qt5OpenGL$<$<CONFIG:Debug>:d>.*
  115. Qt5Widgets$<$<CONFIG:Debug>:d>.*
  116. )
  117. windows_copy_files(citra-qt ${Qt5_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$<CONFIG:Debug>:d>.*)
  118. unset(Qt5_DLL_DIR)
  119. unset(Qt5_PLATFORMS_DIR)
  120. unset(DLL_DEST)
  121. unset(PLATFORMS)
  122. endif()