source: flair-src/trunk/lib/FlairCore/CMakeLists.txt@ 15

Last change on this file since 15 was 2, checked in by Sanahuja Guillaume, 9 years ago

flaircore

File size: 1.2 KB
Line 
1PROJECT(FlairCore)
2cmake_minimum_required(VERSION 2.8)
3include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
4
5find_package(LibXml2 REQUIRED)
6
7execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
8 OUTPUT_VARIABLE GCC_VERSION)
9
10if (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()
16else()
17 message(STATUS "GCC version < 4.3, c+11 is not supported!")
18endif()
19
20FILE(GLOB FLAIRCORE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
21
22INCLUDE_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
30SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
31
32add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/nrt)
33if(NOT WIN32)
34add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/rt)
35endif()
36
37add_custom_target(
38 svn_rev
39 COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/svn_revision.sh $ENV{FLAIR_ROOT}/flair-src ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported/svnversion.h
40)
41
42add_dependencies(FlairCore_rt svn_rev)
43add_dependencies(FlairCore_nrt svn_rev)
Note: See TracBrowser for help on using the repository browser.