0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 01:04:41 +08:00
easy_profiler/CMakeLists.txt

67 lines
1.5 KiB
CMake

project(profiling_tool)
cmake_minimum_required(VERSION 2.8)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(
ROOT
${CMAKE_CURRENT_LIST_DIR}
)
file (STRINGS ${ROOT}/version.info PRODUCT_VERSION_STRING)
string(REPLACE "." ";" VERSION_LIST ${PRODUCT_VERSION_STRING})
list(GET VERSION_LIST 0 PROGRAM_VERSION_MAJOR)
list(GET VERSION_LIST 1 PROGRAM_VERSION_MINOR)
list(GET VERSION_LIST 2 PROGRAM_VERSION_PATCH)
message(STATUS "PROGRAM_VERSION_MAJOR: ${PROGRAM_VERSION_MAJOR}")
message(STATUS "PROGRAM_VERSION_MINOR: ${PROGRAM_VERSION_MINOR}")
message(STATUS "PROGRAM_VERSION_PATCH: ${PROGRAM_VERSION_PATCH}")
# EasyProfiler version
add_definitions(
-DEASY_VERSION_MAJOR=${PROGRAM_VERSION_MAJOR}
-DEASY_VERSION_MINOR=${PROGRAM_VERSION_MINOR}
-DEASY_VERSION_REV=${PROGRAM_VERSION_PATCH}
-DPRODUCT_VERSION=\"v${PRODUCT_VERSION_STRING}\"
)
# EasyProfiler version
set(OUTPUT_DIR
${ROOT}/bin
)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
${OUTPUT_DIR}
)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
${OUTPUT_DIR}
)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${OUTPUT_DIR}
)
include_directories(
include
)
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -Wno-reorder -pedantic -O3" )
else()
add_definitions(
-D_CRT_SECURE_NO_WARNINGS
)
endif(UNIX)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk)
add_subdirectory(src)
add_subdirectory(sample)
add_subdirectory(reader)
add_subdirectory(profiler_gui)