source: flair-src/trunk/lib/FlairVisionFilter/CMakeLists.txt@ 297

Last change on this file since 297 was 297, checked in by Sanahuja Guillaume, 3 years ago

going to out of source build

File size: 1.9 KB
RevLine 
[122]1PROJECT(FlairVisionFilter)
2cmake_minimum_required(VERSION 2.8)
3include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
4
[268]5if(NOT "${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE}" MATCHES "armv5te")
6
[122]7find_package(LibXml2 REQUIRED)
8
9execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
10 OUTPUT_VARIABLE GCC_VERSION)
11
12if (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
13 if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
14 ADD_DEFINITIONS("-std=c++11")
15 else()
16 ADD_DEFINITIONS("-std=c++0x")
17 endif()
18else()
19 message(STATUS "GCC version < 4.3, c+11 is not supported!")
20endif()
21
22INCLUDE_DIRECTORIES(
23 ${LIBXML2_INCLUDE_DIR}
24 ${CMAKE_CURRENT_SOURCE_DIR}/src
[123]25 ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported
[270]26 ${CMAKE_CURRENT_SOURCE_DIR}/../FlairCore/src
[273]27 ${CMAKE_CURRENT_SOURCE_DIR}/../FlairFilter/src
[211]28 ${CMAKE_SYSROOT}/usr/include/opencv1
[122]29)
30
31FILE(GLOB SRC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
32
33ADD_LIBRARY(${PROJECT_NAME}
34 ${SRC_SRC}
35)
36
37INSTALL(TARGETS ${PROJECT_NAME}
38 LIBRARY DESTINATION $ENV{FLAIR_ROOT}/flair-bin/lib/${ARCH_DIR}
39 ARCHIVE DESTINATION $ENV{FLAIR_ROOT}/flair-bin/lib/${ARCH_DIR}
40)
41
42FILE(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h")
43INSTALL(FILES ${HEADER_FILES} DESTINATION $ENV{FLAIR_ROOT}/flair-dev/include/${PROJECT_NAME})
44
45add_custom_target(
[297]46 ${PROJECT_NAME}_compile_info
[122]47 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
48)
49
[297]50add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_compile_info)
[268]51
52else()
53 if(DEFINED CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE)
54 warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR_DEFAULTTUNE} architecture")
55 else()
56 warn("${PROJECT_NAME} will not be built for ${CMAKE_SYSTEM_PROCESSOR} architecture")
57 endif()
58endif()
Note: See TracBrowser for help on using the repository browser.