source: flair-src/trunk/tools/FlairGCS/CMakeLists.txt@ 99

Last change on this file since 99 was 88, checked in by Sanahuja Guillaume, 8 years ago

m

File size: 2.3 KB
RevLine 
[40]1PROJECT(flairgcs)
[9]2cmake_minimum_required(VERSION 2.8)
3include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake)
4
[88]5execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
6 OUTPUT_VARIABLE GCC_VERSION)
[9]7
[88]8if (GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
9 if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
10 ADD_DEFINITIONS("-std=c++11")
11 else()
12 ADD_DEFINITIONS("-std=c++0x")
13 endif()
14else()
15 message(STATUS "GCC version < 4.3, c+11 is not supported!")
16endif()
17
18FILE(GLOB PROJECT_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
19
[9]20SET(FILES_TO_MOC
21 src/UdtSocket.h
22 src/RangeFinderPlot.h
23 src/DataPlot2D.h
24 src/Picture.h
25 src/Manager.h
26 src/file_ui.h
27 src/Vector3DSpinBox.h
28 src/DoubleSpinBox.h
29 src/SpinBox.h
30 src/CheckBox.h
31 src/ComboBox.h
32 src/PushButton.h
33 src/mapwidget.h
34 src/Map.h
35 src/XmlWidget.h
36 src/ConnectionLayout.h
[88]37 src/ListWidget.h
[9]38)
39
40FIND_PACKAGE(Qt4 REQUIRED)
41SET(QT_USE_QTGUI TRUE)
42SET(QT_USE_QTMAIN TRUE)
43SET(QT_USE_QTXML TRUE)
44SET(QT_USE_QTNETWORK TRUE)
45INCLUDE(${QT_USE_FILE})
46
47QT4_WRAP_CPP(MOC_SOURCES ${FILES_TO_MOC})
48
49# generate rules for building source files from the resources
50QT4_ADD_RESOURCES(RCC_SOURCES "src/ressources.qrc")
51
52ADD_DEFINITIONS(${QT_DEFINITIONS})
53ADD_DEFINITIONS(-DQT_THREAD_SUPPORT -DQT_NO_DEBUG)
54
55include_directories(
56 ${CMAKE_SOURCE_DIR}/src
57 ${CMAKE_SOURCE_DIR}/../../lib/FlairCore/src/unexported
58 ${QT_INCLUDE_DIR}
59 ${CMAKE_SYSROOT}/usr/include/udt
60 ${CMAKE_SYSROOT}/usr/include/qwt
[17]61 ${CMAKE_SYSROOT}/usr/include/QwtDataViewer
[9]62 ${CMAKE_SYSROOT}/usr/include/qt4/QtMobility
63 ${CMAKE_SYSROOT}/usr/include/qt4/QtLocation
64)
65
66LINK_DIRECTORIES (
67 ${QT_LIBRARY_DIR}
68)
69
70ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES})
[17]71TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} qwt QwtDataViewer udt QtLocation FileLib z)
[9]72
73INSTALL(
74 TARGETS ${PROJECT_NAME}
75 RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-bin/tools/${ARCH_DIR}
76)
77
78add_custom_target(
[45]79 compile_info
80 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
[9]81)
82
[45]83add_dependencies(${PROJECT_NAME} compile_info)
[9]84
85
86SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
Note: See TracBrowser for help on using the repository browser.