CMakeLists.txt 22.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
cmake_minimum_required (VERSION 2.6)

project (qgroundcontrol)

# marcos
macro(find_or_build_from_source PACKAGE PACKAGE_PATH IS_GIT_SUBMODULE)
    add_custom_target(${PACKAGE})
    if (NOT ${PACKAGE}_BUILD_FROM_SOURCE)
        find_package(${PACKAGE})
    endif()
    if (NOT ${PACKAGE}_FOUND)
        set(${PACKAGE}_BUILD_FROM_SOURCE TRUE)
        message(STATUS "could not find package ${PACKAGE}, building from source")
        add_custom_target(${PACKAGE}_BUILD DEPENDS ${PACKAGE}_BUILD.stamp)
        add_dependencies(${PACKAGE} ${PACKAGE}_BUILD)
        set(${PACKAGE}_FOUND TRUE)
        if (${IS_GIT_SUBMODULE})
            message(STATUS "${PACKAGE} detected as git submodule, will attempt to initialize it")
            list(APPEND GIT_SUBMODULES ${PACKAGE_PATH})
            add_dependencies(${PACKAGE}_BUILD GIT)
        endif()
    endif()
endmacro(find_or_build_from_source)

macro(set_default VAR DEFAULT)
    if (NOT DEFINED ${VAR})
        set(${VAR} ${DEFAULT})
    endif()
endmacro(set_default)

# check for out of source build
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
    message(FATAL_ERROR "In-source builds are not allowed. For example run:
    rm CMakeCache.txt
    mkdir build
    cd build
    cmake ..
    make")
endif()

# settings
set(qgroundcontrol_VERSION_MAJOR 0)
set(qgroundcontrol_VERSION_MINOR 2)
set(qgroundcontrol_VERSION_PATCH 0)
set(qgroundcontrol_SOVERSION 0)

set_default(MAVLINK_BUILD_FROM_SOURCE FALSE)
set_default(STATIC_LINKING FALSE)
set_default(IN_SRC_BUILD FALSE)

# built variables
set(qgroundcontrol_VERSION ${qgroundcontrol_VERSION_MAJOR}.${qgroundcontrol_VERSION_MINOR}.${qgroundcontrol_VERSION_PATCH})
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

# only find static libraries
if(STATIC_LINKING)
    message(WARNING "static linking is not yet fully functional and will have linking errors")
    if(WIN32)
        set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
    else(WIN32)
        set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
    endif(WIN32)
endif()

# set build type
if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
      FORCE)
endif(NOT CMAKE_BUILD_TYPE)

# enable languages
enable_language(C)
enable_language(CXX)

# initialize variables
set(qgroundcontrol_LIBRARIES qgroundcontrolNavigation qgroundcontrolCommunication)
set(SCICOSLAB_BLOCKS stdBlocks;jsbsimBlocks;mavlinkBlocks)

# installer
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${qgroundcontrol_VERSION}")
set(CPACK_GENERATOR "DEB")
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
set(CPACK_SET_DESTDIR TRUE)
set(CPACK_PACKAGE_CONTACT "James Goppert james.goppert@gmail.com")
set(CPACK_PACKAGE_DESCRITION_SUMMARY "
    QGroundControl

    A qt based ground-control program for unmanned systems.
    ")
set(CPACK_SOURCE_IGNORE_FILES ${CPACK_SOURCE_IGNORE_FILES}
    /.git/;/build/;~$;.*\\\\.bin$;.*\\\\.swp$)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license.txt")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
set(CPACK_PACKAGE_VERSION_MAJOR ${qgroundcontrol_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${qgroundcontrol_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${qgroundcontrol_VERSION_PATCH})
include(CPack)

# add make dist target
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)

# git submodules
if(IS_DIRECTORY ${PROJECT_SOURCE_DIR}/.git)
    message(STATUS "git repository detected, will attempt to load submodules")
    set(FOUND_GIT_REPO TRUE)
    add_custom_command(OUTPUT GIT.stamp 
        COMMAND cd ${PROJECT_SOURCE_DIR} && git submodule init ${GIT_SUBMODULES}
        COMMAND cd ${PROJECT_SOURCE_DIR} && git submodule update ${GIT_SUBMODULES})
    add_custom_target(GIT DEPENDS GIT.stamp)
else()
    set(FOUND_GIT_REPO FALSE)
endif()

# find libraries with cmake modules
find_package(Qt4 COMPONENTS QtGui QtCore QtNetwork QtOpenGL QtSVG QtXML QtPhonon QtWebKit REQUIRED)
set(PHONON_FIND_QUIETLY FALSE)
find_packagE(Phonon)
find_package(SDL)
find_package(OpenGL)
find_package(OpenSceneGraph 2.8.3 COMPONENTS osgGA osgDB osgUtil osgViewer)
find_or_build_from_source(MAVLINK thirdParty/mavlink FOUND_GIT_REPO)

# build libraries from source if not found on system
if(MAVLINK_BUILD_FROM_SOURCE)
    set(MAVLINK_INCLUDE_DIRS
        ${PROJECT_SOURCE_DIR}/thirdParty/mavlink/include
        ${PROJECT_SOURCE_DIR}/thirdParty/mavlink/include/common
        ${PROJECT_SOURCE_DIR}/thirdParty/mavlink/include/pixhawk
        ${PROJECT_SOURCE_DIR}/thirdParty/mavlink/include/slugs
        ${PROJECT_SOURCE_DIR}/thirdParty/mavlink/include/ualberta
        ${PROJECT_SOURCE_DIR}/thirdParty/mavlink/include/ardupilotmega
        )

    add_custom_command(OUTPUT MAVLINK_BUILD.stamp 
        COMMAND touch MAVLINK_BUILD.stamp)
endif()

# data directory
if(IN_SRC_BUILD)
    message(STATUS "configuring for in source build")
    set(DATADIR ${PROJECT_SOURCE_DIR}/data)
    set(LIBDIR ${CMAKE_SOURCE_DIR}/data)
    set(BINDIR ${CMAKE_BINARY_DIR}/bin)
else()
    message(STATUS "configuring for install build")
    set(DATADIR ${CMAKE_INSTALL_PREFIX}/share/qgroundcontrol/data)
    set(LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
    set(BINDIR ${CMAKE_INSTALL_PREFIX}/bin)
endif()

# install data files
install(DIRECTORY "${PROJECT_SOURCE_DIR}/data"
    DESTINATION share/qgroundcontrol
    PATTERN "*.git*" EXCLUDE)

# pkgconfig
install(FILES
    qgroundcontrol.pc
    DESTINATION lib/pkgconfig
    )

# internal library list definition / dep summary
message(STATUS "=======================================")
message(STATUS "\tLIBRARY\t\t\tBUILDING")
message(STATUS "=======================================")
message(STATUS "\t\tMavlink\t\tYES")
if (OPENSCENEGRAPH_FOUND)
    list(APPEND qgroundcontrol_LIBRARIES qgroundcontrolVisualization)
    message(STATUS "\t\tOpenSceneGraph\tYES")
else()
    message(STATUS "\t\tOpenSceneGraph\t\tNO")
endif (OPENSCENEGRAPH_FOUND)
if (QT4_FOUND)
    message(STATUS "\t\tQT4\t\tYES")
else()
    message(STATUS "\t\tQT4\t\tNO")
endif (QT4_FOUND)
if (PHONON_FOUND)
    message(STATUS "\t\tPHONON\t\tYES")
else()
    message(STATUS "\t\tPHONON\t\tNO")
endif (PHONON_FOUND)
message(${PHONON_INCLUDE_DIR})

message(STATUS "=======================================")

# project wide flags
include (${QT_USE_FILE})
include_directories(
    src
    src/ui
    src/ui/linechart
    src/ui/uas
    src/ui/map
    src/ui/map3D
    src/uas
    src/comm
    include/ui
    src/input
    src/lib/qmapcontrol
    src/ui/mavlink
    src/ui/param
    src/ui/watchdog
    src/ui/map3D
    src/ui/designer
    src/lib/qextserialport
    src/lib/qwt
    lib/QMapControl
214
    ${PROJECT_BINARY_DIR}
215 216 217 218 219 220 221
    ${SDL_INCLUDE_DIR}
    ${OPENGL_INCLUDE_DIR}
    ${OPENSCENEGRAPH_INCLUDE_DIRS}
    ${QT_INCLUDE_DIRS}
    ${PHONON_INCLUDE_DIR}/phonon
    ${MAVLINK_INCLUDE_DIRS}
    )
222

223
link_libraries(
224
    ${SDL_LIBRARY}
225 226 227 228
    ${OPENGL_LIBRARIES}
    ${OSG_LIBRARIES}
    ${QT_LIBRARIES}
    ${PHONON_LIBS}
229 230 231
    qextserialport
    qmapcontrol
    qwt
232 233 234
    )
add_definitions(-D_TTY_POSIX_)

235
# forms
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
set(qgroundcontrolUiSrc
    src/ui/MainWindow.ui
    src/ui/CommSettings.ui
    src/ui/SerialSettings.ui
    src/ui/UASControl.ui
    src/ui/UASList.ui
    src/ui/UASInfo.ui
    src/ui/Linechart.ui
    src/ui/UASView.ui
    src/ui/ParameterInterface.ui
    src/ui/WaypointList.ui
    src/ui/WaypointView.ui
    src/ui/ObjectDetectionView.ui
    src/ui/JoystickWidget.ui
    src/ui/DebugConsole.ui
    src/ui/MapWidget.ui
    src/ui/XMLCommProtocolWidget.ui
    src/ui/HDDisplay.ui
    src/ui/MAVLinkSettingsWidget.ui
    src/ui/AudioOutputWidget.ui
    src/ui/QGCSensorSettingsWidget.ui
    src/ui/watchdog/WatchdogControl.ui
    src/ui/watchdog/WatchdogProcessView.ui
    src/ui/watchdog/WatchdogView.ui
    src/ui/QGCFirmwareUpdate.ui
    src/ui/QGCPxImuFirmwareUpdate.ui
    src/ui/QGCDataPlot2D.ui
    src/ui/QGCRemoteControlView.ui
    src/ui/QMap3D.ui
    src/ui/QGCWebView.ui
    src/ui/map3D/QGCGoogleEarthView.ui
    src/ui/SlugsDataSensorView.ui
    src/ui/SlugsHilSim.ui
    src/ui/SlugsPIDControl.ui
    src/ui/SlugsVideoCamControl.ui
    src/ui/SlugsPadCameraControl.ui
    src/ui/uas/QGCUnconnectedInfoWidget.ui
    src/ui/designer/QGCToolWidget.ui
    src/ui/designer/QGCParamSlider.ui
    src/ui/designer/QGCActionButton.ui
    src/ui/QGCMAVLinkLogPlayer.ui
    src/ui/QGCWaypointListMulti.ui
    src/ui/mission/QGCCustomWaypointAction.ui
    src/ui/QGCUDPLinkConfiguration.ui
    src/ui/QGCSettingsWidget.ui
    )

283
# non qt object headers
284 285
set(qgroundcontrolHdrs
    src/Core.h
286 287 288 289 290 291
    src/GAudioOutput.h
    src/LogCompressor.h
    src/MG.h
    src/QGC.h
    src/Waypoint.h
    src/comm/AS4Protocol.h
292
    src/comm/LinkInterface.h
293
    src/comm/LinkManager.h
294 295
    src/comm/MAVLinkProtocol.h
    src/comm/MAVLinkSimulationLink.h
296 297 298 299 300 301 302 303 304 305
    src/comm/MAVLinkSimulationMAV.h
    src/comm/MAVLinkSimulationWaypointPlanner.h
    src/comm/MAVLinkSwarmSimulationLink.h
    src/comm/MAVLinkSyntaxHighlighter.h
    src/comm/MAVLinkXMLParser.h
    src/comm/ProtocolInterface.h
    src/comm/QGCMAVLink.h
    src/comm/SerialLink.h
    src/comm/SerialLinkInterface.h
    src/comm/SerialSimulationLink.h
306
    src/comm/UDPLink.h
307
    src/configuration.h
308 309
    src/input/JoystickInput.h
    src/uas/ArduPilotMegaMAV.h
310 311 312 313 314 315
    src/uas/PxQuadMAV.h
    src/uas/QGCMAVLinkUASFactory.h
    src/uas/SlugsMAV.h
    src/uas/UAS.h
    src/uas/UASInterface.h
    src/uas/UASManager.h
316
    src/uas/UASWaypointManager.h
317 318 319 320 321 322 323 324 325 326 327
    src/ui/map/Waypoint2DIcon.h
    src/ui/map/MAV2DIcon.h
    )

# qt object headers
set (qgroundcontrolMocSrc
    src/ui/AudioOutputWidget.h
    src/ui/CameraView.h
    src/ui/CommConfigurationWindow.h
    src/ui/DebugConsole.h
    src/ui/HDDisplay.h
328
    src/ui/HSIDisplay.h
329 330 331 332 333 334 335 336
    src/ui/HUD.h
    src/ui/JoystickWidget.h
    src/ui/MAVLinkSettingsWidget.h
    src/ui/MainWindow.h
    src/ui/MapWidget.h
    src/ui/ObjectDetectionView.h
    src/ui/ParameterInterface.h
    src/ui/QGCDataPlot2D.h
337
    src/ui/QGCFirmwareUpdate.h
338 339 340
    src/ui/QGCMAVLinkLogPlayer.h
    src/ui/QGCMainWindowAPConfigurator.h
    src/ui/QGCParamWidget.h
341 342
    src/ui/QGCPxImuFirmwareUpdate.h
    src/ui/QGCRemoteControlView.h
343 344 345 346 347 348 349 350
    src/ui/QGCSensorSettingsWidget.h
    src/ui/QGCSettingsWidget.h
    src/ui/QGCUDPLinkConfiguration.h
    src/ui/QGCWaypointListMulti.h
    src/ui/QGCWebView.h
    src/ui/RadioCalibration/AbstractCalibrator.h
    src/ui/RadioCalibration/AirfoilServoCalibrator.h
    src/ui/RadioCalibration/CurveCalibrator.h
351 352 353
    src/ui/RadioCalibration/RadioCalibrationData.h
    src/ui/RadioCalibration/RadioCalibrationWindow.h
    src/ui/RadioCalibration/SwitchCalibrator.h
354
    src/ui/SerialConfigurationWindow.h
355 356 357 358
    src/ui/SlugsDataSensorView.h
    src/ui/SlugsHilSim.h
    src/ui/SlugsPIDControl.h
    src/ui/SlugsPadCameraControl.h
359 360 361 362
    src/ui/SlugsVideoCamControl.h
    src/ui/WaypointList.h
    src/ui/WaypointView.h
    src/ui/XMLCommProtocolWidget.h
363
    src/ui/designer/QGCActionButton.h
364 365
    src/ui/designer/QGCParamSlider.h
    src/ui/designer/QGCToolWidget.h
366
    src/ui/designer/QGCToolWidgetItem.h
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
    src/ui/linechart/IncrementalPlot.h
    src/ui/linechart/LinechartPlot.h
    src/ui/linechart/LinechartWidget.h
    src/ui/linechart/Linecharts.h
    src/ui/linechart/ScrollZoomer.h
    src/ui/linechart/Scrollbar.h
    src/ui/map3D/QGCWebPage.h
    src/ui/mavlink/DomItem.h
    src/ui/mavlink/DomModel.h
    src/ui/uas/QGCUnconnectedInfoWidget.h
    src/ui/uas/UASControlWidget.h
    src/ui/uas/UASInfoWidget.h
    src/ui/uas/UASListWidget.h
    src/ui/uas/UASView.h
    src/ui/watchdog/WatchdogControl.h
    src/ui/watchdog/WatchdogProcessView.h
    src/ui/watchdog/WatchdogView.h
384 385
    )

386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413
# source
set (qgroundcontrolSrc
    src/main.cc
    src/Core.cc
    src/GAudioOutput.cc
    src/LogCompressor.cc
    src/QGC.cc
    src/Waypoint.cc
    src/comm/AS4Protocol.cc
    src/comm/LinkManager.cc
    src/comm/MAVLinkProtocol.cc
    src/comm/MAVLinkSimulationLink.cc
    src/comm/MAVLinkSimulationMAV.cc
    src/comm/MAVLinkSimulationWaypointPlanner.cc
    src/comm/MAVLinkSwarmSimulationLink.cc
    src/comm/MAVLinkSyntaxHighlighter.cc
    src/comm/MAVLinkXMLParser.cc
    src/comm/SerialLink.cc
    src/comm/SerialSimulationLink.cc
    src/comm/UDPLink.cc
    src/input/JoystickInput.cc
    src/uas/ArduPilotMegaMAV.cc
    src/uas/PxQuadMAV.cc
    src/uas/QGCMAVLinkUASFactory.cc
    src/uas/SlugsMAV.cc
    src/uas/UAS.cc
    src/uas/UASManager.cc
    src/uas/UASWaypointManager.cc
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478
    src/ui/AudioOutputWidget.cc
    src/ui/CameraView.cc
    src/ui/CommConfigurationWindow.cc
    src/ui/DebugConsole.cc
    src/ui/HDDisplay.cc
    src/ui/HSIDisplay.cc
    src/ui/HUD.cc
    src/ui/JoystickWidget.cc
    src/ui/MAVLinkSettingsWidget.cc
    src/ui/MainWindow.cc
    src/ui/MapWidget.cc
    src/ui/ObjectDetectionView.cc
    src/ui/ParameterInterface.cc
    src/ui/QGCDataPlot2D.cc
    src/ui/QGCFirmwareUpdate.cc
    src/ui/QGCMAVLinkLogPlayer.cc
    src/ui/QGCMainWindowAPConfigurator.cc
    src/ui/QGCParamWidget.cc
    src/ui/QGCPxImuFirmwareUpdate.cc
    src/ui/QGCRemoteControlView.cc
    src/ui/QGCSensorSettingsWidget.cc
    src/ui/QGCSettingsWidget.cc
    src/ui/QGCUDPLinkConfiguration.cc
    src/ui/QGCWaypointListMulti.cc
    src/ui/QGCWebView.cc
    src/ui/RadioCalibration/AbstractCalibrator.cc
    src/ui/RadioCalibration/AirfoilServoCalibrator.cc
    src/ui/RadioCalibration/CurveCalibrator.cc
    src/ui/RadioCalibration/RadioCalibrationData.cc
    src/ui/RadioCalibration/RadioCalibrationWindow.cc
    src/ui/RadioCalibration/SwitchCalibrator.cc
    src/ui/SerialConfigurationWindow.cc
    src/ui/SlugsDataSensorView.cc
    src/ui/SlugsHilSim.cc
    src/ui/SlugsPIDControl.cpp
    src/ui/SlugsPadCameraControl.cpp
    src/ui/SlugsVideoCamControl.cpp
    src/ui/WaypointList.cc
    src/ui/WaypointView.cc
    src/ui/XMLCommProtocolWidget.cc
    src/ui/designer/QGCActionButton.cc
    src/ui/designer/QGCParamSlider.cc
    src/ui/designer/QGCToolWidget.cc
    src/ui/designer/QGCToolWidgetItem.cc
    src/ui/linechart/IncrementalPlot.cc
    src/ui/linechart/LinechartPlot.cc
    src/ui/linechart/LinechartWidget.cc
    src/ui/linechart/Linecharts.cc
    src/ui/linechart/ScrollZoomer.cc
    src/ui/linechart/Scrollbar.cc
    src/ui/map/MAV2DIcon.cc
    src/ui/map/Waypoint2DIcon.cc
    src/ui/map3D/QGCWebPage.cc
    src/ui/mavlink/DomItem.cc
    src/ui/mavlink/DomModel.cc
    src/ui/uas/QGCUnconnectedInfoWidget.cc
    src/ui/uas/UASControlWidget.cc
    src/ui/uas/UASInfoWidget.cc
    src/ui/uas/UASListWidget.cc
    src/ui/uas/UASView.cc
    src/ui/watchdog/WatchdogControl.cc
    src/ui/watchdog/WatchdogProcessView.cc
    src/ui/watchdog/WatchdogView.cc
    )

479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504
set (qmapcontrolHdrs
    lib/QMapControl/src/googlemapadapter.h
    lib/QMapControl/src/circlepoint.h
    lib/QMapControl/src/mapnetwork.h
    lib/QMapControl/src/wmsmapadapter.h
    lib/QMapControl/src/mapadapter.h
    lib/QMapControl/src/geometrylayer.h
    lib/QMapControl/src/linestring.h
    lib/QMapControl/src/mapcontrol.h
    lib/QMapControl/src/tilemapadapter.h
    lib/QMapControl/src/curve.h
    lib/QMapControl/src/imagemanager.h
    lib/QMapControl/src/layer.h
    lib/QMapControl/src/maplayer.h
    lib/QMapControl/src/geometry.h
    lib/QMapControl/src/googlesatmapadapter.h
    lib/QMapControl/src/point.h
    lib/QMapControl/src/osmmapadapter.h
    lib/QMapControl/src/gps_position.h
    lib/QMapControl/src/layermanager.h
    lib/QMapControl/src/fixedimageoverlay.h
    lib/QMapControl/src/openaerialmapadapter.h
    lib/QMapControl/src/emptymapadapter.h
    lib/QMapControl/src/yahoomapadapter.h
    lib/QMapControl/src/imagepoint.h
    lib/QMapControl/qmapcontrol.h
505 506
    )

507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696
set (qmapcontrolSrc
    lib/QMapControl/src/point.cpp
    lib/QMapControl/src/imagepoint.cpp
    lib/QMapControl/src/yahoomapadapter.cpp
    lib/QMapControl/src/layermanager.cpp
    lib/QMapControl/src/circlepoint.cpp
    lib/QMapControl/src/imagemanager.cpp
    lib/QMapControl/src/maplayer.cpp
    lib/QMapControl/src/geometrylayer.cpp
    lib/QMapControl/src/mapadapter.cpp
    lib/QMapControl/src/mapnetwork.cpp
    lib/QMapControl/src/linestring.cpp
    lib/QMapControl/src/osmmapadapter.cpp
    lib/QMapControl/src/fixedimageoverlay.cpp
    lib/QMapControl/src/layer.cpp
    lib/QMapControl/src/openaerialmapadapter.cpp
    lib/QMapControl/src/geometry.cpp
    lib/QMapControl/src/mapcontrol.cpp
    lib/QMapControl/src/tilemapadapter.cpp
    lib/QMapControl/src/googlemapadapter.cpp
    lib/QMapControl/src/wmsmapadapter.cpp
    lib/QMapControl/src/googlesatmapadapter.cpp
    lib/QMapControl/src/curve.cpp
    lib/QMapControl/src/emptymapadapter.cpp
    lib/QMapControl/src/gps_position.cpp
    )

set (qwtHdrs
    src/lib/qwt/qwt_plot_panner.h
    src/lib/qwt/qwt_plot_marker.h
    src/lib/qwt/qwt_plot_curve.h
    src/lib/qwt/qwt_double_range.h
    src/lib/qwt/qwt_symbol.h
    src/lib/qwt/qwt_event_pattern.h
    src/lib/qwt/qwt_abstract_scale_draw.h
    src/lib/qwt/qwt_clipper.h
    src/lib/qwt/qwt_compass_rose.h
    src/lib/qwt/qwt_wheel.h
    src/lib/qwt/qwt_raster_data.h
    src/lib/qwt/qwt.h
    src/lib/qwt/qwt_text_label.h
    src/lib/qwt/qwt_legend_itemmanager.h
    src/lib/qwt/qwt_picker.h
    src/lib/qwt/qwt_layout_metrics.h
    src/lib/qwt/qwt_curve_fitter.h
    src/lib/qwt/qwt_picker_machine.h
    src/lib/qwt/qwt_magnifier.h
    src/lib/qwt/qwt_round_scale_draw.h
    src/lib/qwt/qwt_knob.h
    src/lib/qwt/qwt_plot_svgitem.h
    src/lib/qwt/qwt_plot_picker.h
    src/lib/qwt/qwt_valuelist.h
    src/lib/qwt/qwt_global.h
    src/lib/qwt/qwt_plot_zoomer.h
    src/lib/qwt/qwt_counter.h
    src/lib/qwt/qwt_plot.h
    src/lib/qwt/qwt_painter.h
    src/lib/qwt/qwt_plot_canvas.h
    src/lib/qwt/qwt_plot_item.h
    src/lib/qwt/qwt_double_interval.h
    src/lib/qwt/qwt_plot_magnifier.h
    src/lib/qwt/qwt_arrow_button.h
    src/lib/qwt/qwt_color_map.h
    src/lib/qwt/qwt_math.h
    src/lib/qwt/qwt_scale_map.h
    src/lib/qwt/qwt_text_engine.h
    src/lib/qwt/qwt_interval_data.h
    src/lib/qwt/qwt_dial.h
    src/lib/qwt/qwt_data.h
    src/lib/qwt/qwt_text.h
    src/lib/qwt/qwt_polygon.h
    src/lib/qwt/qwt_plot_spectrogram.h
    src/lib/qwt/qwt_plot_grid.h
    src/lib/qwt/qwt_spline.h
    src/lib/qwt/qwt_scale_widget.h
    src/lib/qwt/qwt_legend.h
    src/lib/qwt/qwt_plot_layout.h
    src/lib/qwt/qwt_dial_needle.h
    src/lib/qwt/qwt_rect.h
    src/lib/qwt/qwt_analog_clock.h
    src/lib/qwt/qwt_dyngrid_layout.h
    src/lib/qwt/qwt_slider.h
    src/lib/qwt/qwt_scale_draw.h
    src/lib/qwt/qwt_plot_rasteritem.h
    src/lib/qwt/qwt_legend_item.h
    src/lib/qwt/qwt_scale_engine.h
    src/lib/qwt/qwt_double_rect.h
    src/lib/qwt/qwt_abstract_scale.h
    src/lib/qwt/qwt_abstract_slider.h
    src/lib/qwt/qwt_compass.h
    src/lib/qwt/qwt_plot_scaleitem.h
    src/lib/qwt/qwt_panner.h
    src/lib/qwt/qwt_thermo.h
    src/lib/qwt/qwt_plot_dict.h
    src/lib/qwt/qwt_scale_div.h
    src/lib/qwt/qwt_paint_buffer.h
    src/lib/qwt/qwt_plot_printfilter.h
    src/lib/qwt/qwt_array.h
    )

set (qwtSrc
    src/lib/qwt/qwt_plot_magnifier.cpp
    src/lib/qwt/qwt_plot_curve.cpp
    src/lib/qwt/qwt_panner.cpp
    src/lib/qwt/qwt_round_scale_draw.cpp
    src/lib/qwt/qwt_clipper.cpp
    src/lib/qwt/qwt_plot_printfilter.cpp
    src/lib/qwt/qwt_data.cpp
    src/lib/qwt/qwt_text_engine.cpp
    src/lib/qwt/qwt_dial.cpp
    src/lib/qwt/qwt_plot_rasteritem.cpp
    src/lib/qwt/qwt_spline.cpp
    src/lib/qwt/qwt_rect.cpp
    src/lib/qwt/qwt_plot_canvas.cpp
    src/lib/qwt/qwt_magnifier.cpp
    src/lib/qwt/qwt_analog_clock.cpp
    src/lib/qwt/qwt_knob.cpp
    src/lib/qwt/qwt_counter.cpp
    src/lib/qwt/qwt_plot_axis.cpp
    src/lib/qwt/qwt_interval_data.cpp
    src/lib/qwt/qwt_scale_map.cpp
    src/lib/qwt/qwt_slider.cpp
    src/lib/qwt/qwt_compass_rose.cpp
    src/lib/qwt/qwt_plot_print.cpp
    src/lib/qwt/qwt_plot_layout.cpp
    src/lib/qwt/qwt_abstract_scale_draw.cpp
    src/lib/qwt/qwt_abstract_slider.cpp
    src/lib/qwt/qwt_picker.cpp
    src/lib/qwt/qwt_raster_data.cpp
    src/lib/qwt/qwt_picker_machine.cpp
    src/lib/qwt/qwt_plot_marker.cpp
    src/lib/qwt/qwt_scale_draw.cpp
    src/lib/qwt/qwt_thermo.cpp
    src/lib/qwt/qwt_layout_metrics.cpp
    src/lib/qwt/qwt_dial_needle.cpp
    src/lib/qwt/qwt_plot_xml.cpp
    src/lib/qwt/qwt_legend.cpp
    src/lib/qwt/qwt_plot_picker.cpp
    src/lib/qwt/qwt_event_pattern.cpp
    src/lib/qwt/qwt_curve_fitter.cpp
    src/lib/qwt/qwt_double_range.cpp
    src/lib/qwt/qwt_painter.cpp
    src/lib/qwt/qwt_double_interval.cpp
    src/lib/qwt/qwt_math.cpp
    src/lib/qwt/qwt_plot_item.cpp
    src/lib/qwt/qwt_plot_zoomer.cpp
    src/lib/qwt/qwt_symbol.cpp
    src/lib/qwt/qwt_scale_div.cpp
    src/lib/qwt/qwt_color_map.cpp
    src/lib/qwt/qwt_plot.cpp
    src/lib/qwt/qwt_plot_spectrogram.cpp
    src/lib/qwt/qwt_paint_buffer.cpp
    src/lib/qwt/qwt_plot_dict.cpp
    src/lib/qwt/qwt_scale_widget.cpp
    src/lib/qwt/qwt_text.cpp
    src/lib/qwt/qwt_dyngrid_layout.cpp
    src/lib/qwt/qwt_abstract_scale.cpp
    src/lib/qwt/qwt_plot_svgitem.cpp
    src/lib/qwt/qwt_arrow_button.cpp
    src/lib/qwt/qwt_double_rect.cpp
    src/lib/qwt/qwt_compass.cpp
    src/lib/qwt/qwt_wheel.cpp
    src/lib/qwt/qwt_legend_item.cpp
    src/lib/qwt/qwt_plot_scaleitem.cpp
    src/lib/qwt/qwt_text_label.cpp
    src/lib/qwt/qwt_plot_panner.cpp
    src/lib/qwt/qwt_scale_engine.cpp
    src/lib/qwt/qwt_plot_grid.cpp
    )

set (qextserialportHdrs
    src/lib/qextserialport/qextserialport.h
    src/lib/qextserialport/qextserialbase.h
    src/lib/qextserialport/posix_qextserialport.h
    #src/lib/qextserialport/win_qextserialport.h
    src/lib/qextserialport/qextserialenumerator.h
)

set (qextserialportSrc
    src/lib/qextserialport/posix_qextserialport.cpp
    src/lib/qextserialport/qextserialport.cpp
    src/lib/qextserialport/qextserialbase.cpp
    #src/lib/qextserialport/win_qextserialport.cpp
    src/lib/qextserialport/qextserialenumerator.cpp
)

add_library(qextserialport ${qextserialportSrc})
add_library(qmapcontrol ${qmapcontrolSrc})
add_library(qwt ${qwtSrc})

697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712
# process qt files
qt4_wrap_cpp(qgroundcontrolMoc ${qgroundcontrolMocSrc})
qt4_wrap_ui(qgroundcontrolUi ${qgroundcontrolUiSrc})
qt4_add_resources(qgroundcontrolRsc ${qgroundcontrolRscSrc})

#add executable
add_executable(qgroundcontrol
    ${qgroundcontrolSrc}
    ${qgroundcontrolMoc}
    ${qgroundcontrolUi}
    ${qgroundcontrolRsc}
    )
add_dependencies(qgroundcontrol MAVLINK)
install(TARGETS qgroundcontrol DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

# vim:ts=4:sw=4:expandtab