2017-11-20 19:23:15 +02:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
2017-06-08 17:13:32 +03:00
|
|
|
project(easy_profiler CXX)
|
2016-02-16 23:21:12 +03:00
|
|
|
|
2016-11-02 22:37:51 +03:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
2018-02-14 12:02:27 +01:00
|
|
|
option(EASY_PROFILER_NO_GUI "Build easy_profiler without the GUI application (required Qt)" OFF)
|
|
|
|
|
2018-04-02 01:53:29 +03:00
|
|
|
set(EASY_PROGRAM_VERSION_MAJOR 2)
|
2018-06-09 02:18:39 +03:00
|
|
|
set(EASY_PROGRAM_VERSION_MINOR 1)
|
|
|
|
set(EASY_PROGRAM_VERSION_PATCH 0)
|
2017-06-08 17:13:32 +03:00
|
|
|
set(EASY_PRODUCT_VERSION_STRING "${EASY_PROGRAM_VERSION_MAJOR}.${EASY_PROGRAM_VERSION_MINOR}.${EASY_PROGRAM_VERSION_PATCH}")
|
2016-02-16 23:21:12 +03:00
|
|
|
|
2017-08-10 09:29:55 +01:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
2016-02-18 00:47:41 +03:00
|
|
|
|
2017-06-08 17:13:32 +03:00
|
|
|
# set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk)
|
2016-02-18 00:47:41 +03:00
|
|
|
|
2017-06-08 17:13:32 +03:00
|
|
|
macro(easy_define_target_option TARGET SOURCE_OPTION TARGET_DEFINITION)
|
|
|
|
if (${SOURCE_OPTION})
|
|
|
|
set(_VALUE 1)
|
|
|
|
else ()
|
|
|
|
set(_VALUE 0)
|
|
|
|
endif ()
|
|
|
|
target_compile_options(${TARGET} PUBLIC -D${TARGET_DEFINITION}=${_VALUE})
|
|
|
|
endmacro()
|
2016-11-02 22:37:51 +03:00
|
|
|
|
2017-09-01 00:01:38 +03:00
|
|
|
SET(CMAKE_INSTALL_RPATH "$ORIGIN")
|
|
|
|
|
2016-12-02 00:35:25 +03:00
|
|
|
add_subdirectory(easy_profiler_core)
|
2018-01-14 14:50:36 +01:00
|
|
|
if (NOT EASY_PROFILER_NO_GUI)
|
|
|
|
add_subdirectory(profiler_gui)
|
|
|
|
endif()
|
2018-02-07 19:11:12 +03:00
|
|
|
add_subdirectory(easy_profiler_converter)
|
2016-12-02 00:08:25 +03:00
|
|
|
|
2017-06-08 17:13:32 +03:00
|
|
|
if (NOT EASY_PROFILER_NO_SAMPLES)
|
|
|
|
add_subdirectory(sample)
|
|
|
|
add_subdirectory(reader)
|
|
|
|
endif ()
|