0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 08:41:02 +08:00
easy_profiler/profiler_gui/CMakeLists.txt

83 lines
2.1 KiB
CMake
Raw Normal View History

2016-04-29 16:13:32 +03:00
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
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)
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
descriptors_tree_widget.h
descriptors_tree_widget.cpp
easy_chronometer_item.h
easy_chronometer_item.cpp
easy_graphics_item.h
easy_graphics_item.cpp
easy_graphics_scrollbar.h
easy_graphics_scrollbar.cpp
easy_qtimer.h
easy_qtimer.cpp
globals.h
globals.cpp
2016-08-08 22:45:57 +03:00
globals_qobjects.cpp
main_window.h
main_window.cpp
tree_widget_item.h
tree_widget_item.cpp
tree_widget_loader.h
tree_widget_loader.cpp
#treemodel.h
#treemodel.cpp
#treeitem.h
#treeitem.cpp
resources.qrc
2016-09-16 00:54:44 +03:00
resources.rc
2016-06-26 18:46:51 +03:00
)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (UNIX OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}")
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
)
endif (CMAKE_VERSION VERSION_LESS "3.1")
2016-08-18 23:50:53 +03:00
if(UNIX)
set(SPECIAL_LIB pthread)
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)