Last change
on this file since 55 was 45, checked in by Sanahuja Guillaume, 8 years ago |
added compile info
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2] | 1 | PROJECT(FlairCore)
|
---|
| 2 | cmake_minimum_required(VERSION 2.8)
|
---|
| 3 | include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
|
---|
| 4 |
|
---|
| 5 | find_package(LibXml2 REQUIRED)
|
---|
| 6 |
|
---|
| 7 | execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
---|
| 8 | OUTPUT_VARIABLE GCC_VERSION)
|
---|
| 9 |
|
---|
| 10 | if (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
|
---|
| 11 | if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
|
---|
| 12 | ADD_DEFINITIONS("-std=c++11")
|
---|
| 13 | else()
|
---|
| 14 | ADD_DEFINITIONS("-std=c++0x")
|
---|
| 15 | endif()
|
---|
| 16 | else()
|
---|
| 17 | message(STATUS "GCC version < 4.3, c+11 is not supported!")
|
---|
| 18 | endif()
|
---|
| 19 |
|
---|
| 20 | FILE(GLOB FLAIRCORE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
|
---|
[45] | 21 | message(${CMAKE_C_COMPILER})
|
---|
[2] | 22 | INCLUDE_DIRECTORIES(
|
---|
| 23 | ${LIBXML2_INCLUDE_DIR}
|
---|
| 24 | ${CMAKE_SYSROOT}/usr/include/opencv
|
---|
| 25 | ${CMAKE_SYSROOT}/usr/include/udt
|
---|
| 26 | ${CMAKE_CURRENT_SOURCE_DIR}/src
|
---|
| 27 | ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported
|
---|
| 28 | )
|
---|
| 29 |
|
---|
| 30 | SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
---|
| 31 |
|
---|
| 32 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/nrt)
|
---|
| 33 | if(NOT WIN32)
|
---|
| 34 | add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/rt)
|
---|
| 35 | endif()
|
---|
| 36 |
|
---|
| 37 | add_custom_target(
|
---|
[45] | 38 | compile_info
|
---|
| 39 | COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/compile_info.sh ${CMAKE_C_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/compile_info.h
|
---|
[2] | 40 | )
|
---|
| 41 |
|
---|
[45] | 42 | add_dependencies(FlairCore_rt compile_info)
|
---|
| 43 | add_dependencies(FlairCore_nrt compile_info)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.