source: flair-src/tags/0.2.0/lib/FlairVisionFilter/CMakeLists.txt@ 404

Last change on this file since 404 was 216, checked in by Sanahuja Guillaume, 7 years ago

maj

File size: 1.6 KB
Line 
1PROJECT(FlairVisionFilter)
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
20INCLUDE_DIRECTORIES(
21 ${LIBXML2_INCLUDE_DIR}
22 ${CMAKE_CURRENT_SOURCE_DIR}/src
23 ${CMAKE_CURRENT_SOURCE_DIR}/src/unexported
24 $ENV{FLAIR_ROOT}/flair-src/lib/FlairCore/src
25 ${CMAKE_SYSROOT}/usr/include/opencv1
26 ${CMAKE_SYSROOT}/usr/include/opencv
27)
28
29FILE(GLOB SRC_SRC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
30
31SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
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(
46 compile_info
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
50add_dependencies(${PROJECT_NAME} compile_info)
Note: See TracBrowser for help on using the repository browser.