2016-04-29 16:13:32 +03:00
|
|
|
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
|
|
|
|
|
2017-02-08 21:47:20 +03:00
|
|
|
project(profiler_gui CXX)
|
2016-04-29 16:13:32 +03:00
|
|
|
|
2016-06-26 12:48:59 +03:00
|
|
|
#set(CMAKE_PREFIX_PATH f:/qt/5.5/5.6/msvc2013_64/lib/cmake)
|
|
|
|
|
2016-04-29 16:13:32 +03:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
2016-09-14 21:52:11 +03:00
|
|
|
set(CMAKE_AUTORCC ON)
|
2016-04-29 16:13:32 +03:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
2016-12-02 00:08:25 +03:00
|
|
|
find_package(Qt5Widgets)
|
|
|
|
|
|
|
|
if(Qt5Widgets_FOUND)
|
|
|
|
|
2016-12-12 22:26:50 +03:00
|
|
|
if(NOT DEFINED EASY_PROGRAM_VERSION_MAJOR)
|
|
|
|
set(EASY_PROGRAM_VERSION_MAJOR 1)
|
2016-12-02 00:08:25 +03:00
|
|
|
set(EASY_PROGRAM_VERSION_MINOR 0)
|
|
|
|
set(EASY_PROGRAM_VERSION_PATCH 0)
|
2016-12-12 22:26:50 +03:00
|
|
|
set(EASY_PRODUCT_VERSION_STRING "1.0.0")
|
|
|
|
endif(NOT DEFINED EASY_PROGRAM_VERSION_MAJOR)
|
2016-12-02 00:08:25 +03:00
|
|
|
|
|
|
|
add_definitions(
|
|
|
|
-DEASY_PROFILER_VERSION_MAJOR=${EASY_PROGRAM_VERSION_MAJOR}
|
|
|
|
-DEASY_PROFILER_VERSION_MINOR=${EASY_PROGRAM_VERSION_MINOR}
|
|
|
|
-DEASY_PROFILER_VERSION_PATCH=${EASY_PROGRAM_VERSION_PATCH}
|
|
|
|
)
|
2016-09-08 21:03:05 +03:00
|
|
|
|
2016-06-26 18:46:51 +03:00
|
|
|
add_executable(${PROJECT_NAME}
|
|
|
|
main.cpp
|
|
|
|
blocks_graphics_view.h
|
|
|
|
blocks_graphics_view.cpp
|
|
|
|
blocks_tree_widget.h
|
|
|
|
blocks_tree_widget.cpp
|
2016-09-17 15:39:31 +03:00
|
|
|
descriptors_tree_widget.h
|
|
|
|
descriptors_tree_widget.cpp
|
2016-09-15 22:30:32 +03:00
|
|
|
easy_chronometer_item.h
|
|
|
|
easy_chronometer_item.cpp
|
2017-04-03 23:16:36 +03:00
|
|
|
easy_frame_rate_viewer.h
|
|
|
|
easy_frame_rate_viewer.cpp
|
2016-09-15 22:30:32 +03:00
|
|
|
easy_graphics_item.h
|
|
|
|
easy_graphics_item.cpp
|
|
|
|
easy_graphics_scrollbar.h
|
|
|
|
easy_graphics_scrollbar.cpp
|
2016-12-04 16:51:27 +03:00
|
|
|
easy_qtimer.h
|
|
|
|
easy_qtimer.cpp
|
2016-08-03 23:00:04 +03:00
|
|
|
globals.h
|
|
|
|
globals.cpp
|
2016-08-08 22:45:57 +03:00
|
|
|
globals_qobjects.cpp
|
2016-06-26 20:54:16 +03:00
|
|
|
main_window.h
|
|
|
|
main_window.cpp
|
2016-08-18 23:26:41 +03:00
|
|
|
tree_widget_item.h
|
|
|
|
tree_widget_item.cpp
|
|
|
|
tree_widget_loader.h
|
|
|
|
tree_widget_loader.cpp
|
2016-09-14 21:52:11 +03:00
|
|
|
resources.qrc
|
2016-09-16 00:54:44 +03:00
|
|
|
resources.rc
|
2016-06-26 18:46:51 +03:00
|
|
|
)
|
|
|
|
|
2017-02-14 21:22:26 +03:00
|
|
|
if (MINGW)
|
|
|
|
add_definitions(
|
|
|
|
-D_WIN32_WINNT=0x0600
|
|
|
|
-DSTRSAFE_NO_DEPRECATE
|
|
|
|
)
|
|
|
|
set (SPECIAL_LIB ${SPECIAL_LIB} ws2_32 psapi)
|
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
elseif (CMAKE_VERSION VERSION_LESS "3.1")
|
2017-02-08 21:47:20 +03:00
|
|
|
if (UNIX OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
2017-02-14 21:22:26 +03:00
|
|
|
set (CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}")
|
2017-02-08 21:47:20 +03:00
|
|
|
endif (UNIX OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
|
|
else ()
|
|
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
|
|
CXX_STANDARD 11
|
|
|
|
CXX_STANDARD_REQUIRED ON
|
|
|
|
)
|
2017-02-14 21:22:26 +03:00
|
|
|
endif (MINGW)
|
2017-02-08 21:47:20 +03:00
|
|
|
|
2016-08-18 23:50:53 +03:00
|
|
|
if(UNIX)
|
2017-02-14 21:22:26 +03:00
|
|
|
set(SPECIAL_LIB ${SPECIAL_LIB} pthread)
|
2016-08-18 23:50:53 +03:00
|
|
|
endif(UNIX)
|
|
|
|
|
2016-11-17 00:19:06 +03:00
|
|
|
target_link_libraries(${PROJECT_NAME} Qt5::Widgets easy_profiler ${SPECIAL_LIB})
|
2016-12-02 00:08:25 +03:00
|
|
|
else()
|
|
|
|
|
|
|
|
message(STATUS "INFO\n\n\tQt5 not found! Generating EasyProfiler projects without GUI.\n")
|
|
|
|
|
|
|
|
endif(Qt5Widgets_FOUND)
|
|
|
|
|