2016-02-16 23:21:12 +03:00
|
|
|
project(profiling_tool)
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
2016-11-02 22:37:51 +03:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
|
|
|
|
2016-02-16 23:21:12 +03:00
|
|
|
set(
|
2016-09-07 21:32:14 +03:00
|
|
|
ROOT
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}
|
2016-02-16 23:21:12 +03:00
|
|
|
)
|
|
|
|
|
2016-02-18 00:47:41 +03:00
|
|
|
set(OUTPUT_DIR
|
|
|
|
${ROOT}/bin
|
|
|
|
)
|
|
|
|
|
2016-02-16 23:21:12 +03:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
2016-02-18 00:47:41 +03:00
|
|
|
${OUTPUT_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY
|
|
|
|
${OUTPUT_DIR}
|
2016-02-16 23:21:12 +03:00
|
|
|
)
|
|
|
|
|
2016-03-21 06:22:48 +03:00
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY
|
|
|
|
${OUTPUT_DIR}
|
|
|
|
)
|
|
|
|
|
2016-02-16 23:21:12 +03:00
|
|
|
include_directories(
|
2016-09-07 21:32:14 +03:00
|
|
|
include
|
2016-02-16 23:21:12 +03:00
|
|
|
)
|
|
|
|
|
2016-02-17 23:24:35 +03:00
|
|
|
if(UNIX)
|
2016-08-31 21:51:00 +03:00
|
|
|
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" )
|
2016-03-03 14:55:38 +03:00
|
|
|
else()
|
2016-09-07 21:32:14 +03:00
|
|
|
add_definitions(
|
|
|
|
-D_CRT_SECURE_NO_WARNINGS
|
|
|
|
)
|
2016-02-17 23:24:35 +03:00
|
|
|
endif(UNIX)
|
|
|
|
|
2016-11-02 22:37:51 +03:00
|
|
|
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR}/sdk)
|
|
|
|
|
2016-02-16 23:21:12 +03:00
|
|
|
add_subdirectory(src)
|
2016-02-16 23:25:12 +03:00
|
|
|
add_subdirectory(sample)
|
2016-03-21 06:22:48 +03:00
|
|
|
add_subdirectory(reader)
|
2016-04-29 16:13:32 +03:00
|
|
|
add_subdirectory(profiler_gui)
|
2016-11-02 22:37:51 +03:00
|
|
|
|
|
|
|
install(FILES
|
2016-11-13 17:48:41 +03:00
|
|
|
LICENSE.APACHE
|
|
|
|
LICENSE.GPL3
|
2016-11-02 22:37:51 +03:00
|
|
|
DESTINATION .
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_NAME "easy_profiler")
|
|
|
|
set(CPACK_PACKAGE_RELEASE 1)
|
|
|
|
set(CPACK_PACKAGE_CONTACT "Easy Profiler Team")
|
|
|
|
set(CPACK_PACKAGE_VENDOR "Easy Profiler Team")
|
2016-11-13 18:17:35 +03:00
|
|
|
|
|
|
|
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
|
|
|
set(PLATFORM_SUFFIX x64)
|
|
|
|
else()
|
|
|
|
set(PLATFORM_SUFFIX x86)
|
|
|
|
endif(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
|
|
|
|
2016-11-02 22:37:51 +03:00
|
|
|
if(UNIX)
|
2016-11-13 18:17:35 +03:00
|
|
|
|
|
|
|
execute_process( COMMAND ldd --version
|
|
|
|
OUTPUT_VARIABLE LDD_OUT )
|
|
|
|
|
|
|
|
if(LDD_OUT)
|
|
|
|
string( REGEX MATCH "^ldd.*[0-9][.][0-9][0-9]?" LDD_VERSION_STRING ${LDD_OUT} )
|
|
|
|
endif(LDD_OUT)
|
|
|
|
|
|
|
|
if( LDD_VERSION_STRING )
|
|
|
|
string( REGEX MATCH "[0-9][.][0-9][0-9]?" LIBC_VERSION ${LDD_VERSION_STRING} )
|
|
|
|
endif( LDD_VERSION_STRING )
|
|
|
|
|
|
|
|
|
|
|
|
if(LIBC_VERSION)
|
|
|
|
set(CPACK_SYSTEM_NAME "linux_${PLATFORM_SUFFIX}-libc_${LIBC_VERSION}")
|
|
|
|
endif(LIBC_VERSION)
|
|
|
|
|
|
|
|
|
2016-11-02 22:37:51 +03:00
|
|
|
set(CPACK_GENERATOR "TGZ")
|
|
|
|
else()
|
2016-11-13 18:17:35 +03:00
|
|
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP "TRUE")
|
|
|
|
include(InstallRequiredSystemLibraries)
|
|
|
|
|
2016-11-02 22:37:51 +03:00
|
|
|
set(CPACK_GENERATOR "ZIP")
|
|
|
|
endif(UNIX)
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_VERSION "v1.0.0")
|
|
|
|
include(CPack)
|