PROJECT(flairgcs) cmake_minimum_required(VERSION 2.8) include($ENV{FLAIR_ROOT}/flair-dev/cmake-modules/GlobalCmakeFlair.cmake) SET(PROJECT_SOURCE_FILES src/Manager.cpp src/ConnectionLayout.cpp src/main.cpp src/UdtSocket.cpp src/DataPlot1D.cpp src/DataPlot2D.cpp src/RangeFinderPlot.cpp src/Picture.cpp src/DataRemote.cpp src/file_ui.cpp src/FormLayout.cpp src/Vector3DSpinBox.cpp src/DoubleSpinBox.cpp src/SpinBox.cpp src/CheckBox.cpp src/ComboBox.cpp src/Tab.cpp src/TabWidget.cpp src/GroupBox.cpp src/GridLayout.cpp src/Layout.cpp src/PushButton.cpp src/TextEdit.cpp src/Label.cpp src/Map.cpp src/mapwidget.cpp src/Landmark.cpp src/XmlWidget.cpp ) SET(FILES_TO_MOC src/UdtSocket.h src/RangeFinderPlot.h src/DataPlot2D.h src/Picture.h src/Manager.h src/file_ui.h src/Vector3DSpinBox.h src/DoubleSpinBox.h src/SpinBox.h src/CheckBox.h src/ComboBox.h src/PushButton.h src/mapwidget.h src/Map.h src/XmlWidget.h src/ConnectionLayout.h ) FIND_PACKAGE(Qt4 REQUIRED) SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTMAIN TRUE) SET(QT_USE_QTXML TRUE) SET(QT_USE_QTNETWORK TRUE) INCLUDE(${QT_USE_FILE}) QT4_WRAP_CPP(MOC_SOURCES ${FILES_TO_MOC}) # generate rules for building source files from the resources QT4_ADD_RESOURCES(RCC_SOURCES "src/ressources.qrc") ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(-DQT_THREAD_SUPPORT -DQT_NO_DEBUG) include_directories( ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/../../lib/FlairCore/src/unexported ${QT_INCLUDE_DIR} ${CMAKE_SYSROOT}/usr/include/udt ${CMAKE_SYSROOT}/usr/include/qwt ${CMAKE_SYSROOT}/usr/include/QwtDataViewer ${CMAKE_SYSROOT}/usr/include/qt4/QtMobility ${CMAKE_SYSROOT}/usr/include/qt4/QtLocation ) LINK_DIRECTORIES ( ${QT_LIBRARY_DIR} ) ADD_EXECUTABLE(${PROJECT_NAME} ${PROJECT_SOURCE_FILES} ${MOC_SOURCES} ${RCC_SOURCES}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} qwt QwtDataViewer udt QtLocation FileLib z) INSTALL( TARGETS ${PROJECT_NAME} RUNTIME DESTINATION $ENV{FLAIR_ROOT}/flair-bin/tools/${ARCH_DIR} ) add_custom_target( svn_rev COMMAND $ENV{FLAIR_ROOT}/flair-dev/scripts/svn_revision.sh $ENV{FLAIR_ROOT}/flair-src ${CMAKE_CURRENT_SOURCE_DIR}/src/svnversion.h ) add_dependencies(${PROJECT_NAME} svn_rev) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)