CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #set(CMAKE_PREFIX_PATH f:/qt/5.5/5.6/msvc2013_64/lib/cmake)
  2. set(CMAKE_AUTOMOC ON)
  3. set(CMAKE_AUTORCC ON)
  4. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  5. # ATOMIC BEGIN
  6. # moved to easy profiler root CMake, to avoid duplicate checks
  7. # find_package(Qt5Widgets)
  8. # ATOMIC END
  9. if (Qt5Widgets_FOUND)
  10. if (NOT("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") AND WIN32)
  11. set(APPLICATION_PLATFORM WIN32)
  12. endif ()
  13. add_executable(profiler_gui ${APPLICATION_PLATFORM}
  14. main.cpp
  15. blocks_graphics_view.h
  16. blocks_graphics_view.cpp
  17. blocks_tree_widget.h
  18. blocks_tree_widget.cpp
  19. descriptors_tree_widget.h
  20. descriptors_tree_widget.cpp
  21. easy_chronometer_item.h
  22. easy_chronometer_item.cpp
  23. easy_frame_rate_viewer.h
  24. easy_frame_rate_viewer.cpp
  25. easy_graphics_item.h
  26. easy_graphics_item.cpp
  27. easy_graphics_scrollbar.h
  28. easy_graphics_scrollbar.cpp
  29. easy_qtimer.h
  30. easy_qtimer.cpp
  31. globals.h
  32. globals.cpp
  33. globals_qobjects.cpp
  34. main_window.h
  35. main_window.cpp
  36. tree_widget_item.h
  37. tree_widget_item.cpp
  38. tree_widget_loader.h
  39. tree_widget_loader.cpp
  40. resources.qrc
  41. resources.rc
  42. )
  43. # ATOMIC BEGIN
  44. target_link_libraries(profiler_gui Qt5::Widgets)
  45. set_target_properties(profiler_gui PROPERTIES OUTPUT_NAME Profiler)
  46. set_property(TARGET profiler_gui PROPERTY RUNTIME_OUTPUT_DIRECTORY ${ATOMIC_SOURCE_DIR}/Artifacts/Build/Profiler)
  47. if (TARGET easy_profiler_md)
  48. target_link_libraries(profiler_gui easy_profiler_md)
  49. else ()
  50. target_link_libraries(profiler_gui easy_profiler)
  51. endif ()
  52. # ATOMIC END
  53. if (WIN32)
  54. target_compile_definitions(profiler_gui PRIVATE -D_WIN32_WINNT=0x0600)
  55. endif ()
  56. if (MINGW)
  57. target_compile_definitions(profiler_gui PRIVATE -DSTRSAFE_NO_DEPRECATE)
  58. endif ()
  59. else ()
  60. # ATOMIC BEGIN
  61. message(WARNING
  62. "Qt5 not found! Profiler GUI application will not be built!\n"
  63. "You may have to specify path to Qt SDK in CMAKE_PREFIX_PATH variable."
  64. )
  65. # ATOMIC END
  66. endif ()