Changeset View
Changeset View
Standalone View
Standalone View
src/lib/marble/CMakeLists.txt
Show First 20 Lines • Show All 460 Lines • ▼ Show 20 Line(s) | 458 | set(marble_WebKit | |||
---|---|---|---|---|---|
461 | ) | 461 | ) | ||
462 | else() | 462 | else() | ||
463 | set(marble_WebKit | 463 | set(marble_WebKit | ||
464 | MarbleWebView.h | 464 | MarbleWebView.h | ||
465 | TinyWebBrowser.h | 465 | TinyWebBrowser.h | ||
466 | ) | 466 | ) | ||
467 | endif() | 467 | endif() | ||
468 | 468 | | |||
469 | install( FILES | 469 | set( marble_HEADERS | ||
470 | ${CMAKE_CURRENT_BINARY_DIR}/marble_export.h | 470 | ${CMAKE_CURRENT_BINARY_DIR}/marble_export.h | ||
471 | ${graphicsview_HDRS} | 471 | ${graphicsview_HDRS} | ||
472 | ${marble_WebKit} | 472 | ${marble_WebKit} | ||
473 | AutoNavigation.h | 473 | AutoNavigation.h | ||
474 | BookmarkManager.h | 474 | BookmarkManager.h | ||
475 | DownloadRegion.h | 475 | DownloadRegion.h | ||
476 | DownloadRegionDialog.h | 476 | DownloadRegionDialog.h | ||
477 | LatLonBoxWidget.h | 477 | LatLonBoxWidget.h | ||
▲ Show 20 Lines • Show All 132 Lines • ▼ Show 20 Line(s) | |||||
610 | routing/AlternativeRoutesModel.h | 610 | routing/AlternativeRoutesModel.h | ||
611 | routing/Route.h | 611 | routing/Route.h | ||
612 | routing/Maneuver.h | 612 | routing/Maneuver.h | ||
613 | routing/RouteRequest.h | 613 | routing/RouteRequest.h | ||
614 | routing/RouteSegment.h | 614 | routing/RouteSegment.h | ||
615 | routing/RoutingManager.h | 615 | routing/RoutingManager.h | ||
616 | routing/RoutingModel.h | 616 | routing/RoutingModel.h | ||
617 | routing/RoutingProfile.h | 617 | routing/RoutingProfile.h | ||
618 | ) | ||||
618 | 619 | | |||
620 | install( FILES ${marble_HEADERS} | ||||
619 | DESTINATION ${INCLUDE_INSTALL_DIR}/marble | 621 | DESTINATION ${INCLUDE_INSTALL_DIR}/marble | ||
620 | ) | 622 | ) | ||
621 | 623 | | |||
622 | 624 | | |||
625 | include(MarbleQueryQmake) | ||||
626 | include(MarbleAddQCH) | ||||
627 | | ||||
628 | if(BUILD_QCH) | ||||
629 | if(MARBLE_INSTALL_USE_QT_SYS_PATHS) | ||||
630 | query_qmake(qt_docs_dir QT_INSTALL_DOCS) | ||||
631 | set(MARBLE_QTQCH_FULL_INSTALL_DIR "${qt_docs_dir}") | ||||
632 | else() | ||||
633 | set(MARBLE_QTQCH_FULL_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/doc/qch") | ||||
634 | endif() | ||||
635 | | ||||
636 | marble_add_qch( | ||||
637 | Marble_QCH | ||||
638 | NAME Marble | ||||
639 | VERSION ${MARBLE_LIB_VERSION} | ||||
640 | ORG_DOMAIN org.kde | ||||
641 | SOURCES | ||||
642 | ${marble_HEADERS} | ||||
643 | LINK_QCHS | ||||
644 | Qt5Core_QCH | ||||
645 | Qt5Xml_QCH | ||||
646 | Qt5Gui_QCH | ||||
647 | Qt5Widgets_QCH | ||||
648 | BLANK_MACROS | ||||
649 | MARBLE_EXPORT | ||||
650 | MARBLE_DEPRECATED | ||||
651 | GEODATA_EXPORT | ||||
652 | GEODATA_DEPRECATED | ||||
653 | TAGFILE_INSTALL_DESTINATION ${MARBLE_QTQCH_FULL_INSTALL_DIR} | ||||
654 | QCH_INSTALL_DESTINATION ${MARBLE_QTQCH_FULL_INSTALL_DIR} | ||||
655 | ) | ||||
656 | set(marble_qch_targets Marble_QCH) | ||||
657 | endif() | ||||
658 | | ||||
659 | | ||||
623 | ########### CMake Config files ############### | 660 | ########### CMake Config files ############### | ||
624 | 661 | | |||
625 | include(CMakePackageConfigHelpers) | 662 | include(CMakePackageConfigHelpers) | ||
626 | 663 | | |||
627 | set(MARBLE_CMAKECONFIGNAME Marble) | 664 | set(MARBLE_CMAKECONFIGNAME Marble) | ||
628 | set(MARBLE_INSTALL_CMAKECONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${MARBLE_CMAKECONFIGNAME}) | 665 | set(MARBLE_INSTALL_CMAKECONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${MARBLE_CMAKECONFIGNAME}) | ||
629 | 666 | | |||
630 | configure_package_config_file(MarbleConfig.cmake.in | 667 | configure_package_config_file(MarbleConfig.cmake.in | ||
Show All 14 Lines | |||||
645 | ) | 682 | ) | ||
646 | 683 | | |||
647 | install( | 684 | install( | ||
648 | EXPORT MarbleTargets | 685 | EXPORT MarbleTargets | ||
649 | FILE ${MARBLE_CMAKECONFIGNAME}Targets.cmake | 686 | FILE ${MARBLE_CMAKECONFIGNAME}Targets.cmake | ||
650 | DESTINATION ${MARBLE_INSTALL_CMAKECONFIGDIR} | 687 | DESTINATION ${MARBLE_INSTALL_CMAKECONFIGDIR} | ||
651 | ) | 688 | ) | ||
652 | 689 | | |||
690 | marble_install_qch_export( | ||||
691 | TARGETS ${marble_qch_targets} | ||||
692 | FILE ${MARBLE_CMAKECONFIGNAME}QCHTargets.cmake | ||||
693 | DESTINATION "${MARBLE_INSTALL_CMAKECONFIGDIR}" | ||||
694 | COMPONENT Devel | ||||
695 | ) | ||||
696 | | ||||
653 | 697 | | |||
654 | ########### Qt Pri file ############### | 698 | ########### Qt Pri file ############### | ||
655 | 699 | | |||
656 | # Where the pri file is installed is defined by the following rules, with decreasing priority: | 700 | # Where the pri file is installed is defined by the following rules, with decreasing priority: | ||
657 | # * MARBLE_PRI_INSTALL_USE_QT_SYS_PATHS=TRUE: | 701 | # * MARBLE_INSTALL_USE_QT_SYS_PATHS=TRUE: | ||
658 | # pri file will be installed with the dirs of the Qt installation used | 702 | # pri file will be installed with the dirs of the Qt installation used | ||
659 | # * MARBLE_PRI_INSTALL_DIR=some-relative-or-absolute-path | 703 | # * MARBLE_PRI_INSTALL_DIR=some-relative-or-absolute-path | ||
660 | # if set will be used as given | 704 | # if set will be used as given | ||
661 | # * installation prefix = Qt installation prefix: | 705 | # * installation prefix = Qt installation prefix: | ||
662 | # pri file will be installed with the dirs of the Qt installation used | 706 | # pri file will be installed with the dirs of the Qt installation used | ||
663 | # * otherwise: | 707 | # * otherwise: | ||
664 | # pri file will be installed in mkspecs/modules in the installation prefix | 708 | # pri file will be installed in mkspecs/modules in the installation prefix | ||
665 | 709 | | |||
Show All 25 Lines | |||||
691 | QT.Marble.defines = | 735 | QT.Marble.defines = | ||
692 | QT.Marble.includes = ${PRI_ABS_INCLUDE_INSTALL_DIR} | 736 | QT.Marble.includes = ${PRI_ABS_INCLUDE_INSTALL_DIR} | ||
693 | QT.Marble.private_includes = | 737 | QT.Marble.private_includes = | ||
694 | QT.Marble.libs = ${PRI_ABS_LIB_INSTALL_DIR} | 738 | QT.Marble.libs = ${PRI_ABS_LIB_INSTALL_DIR} | ||
695 | QT.Marble.depends = ${PRI_DEPS} | 739 | QT.Marble.depends = ${PRI_DEPS} | ||
696 | " | 740 | " | ||
697 | ) | 741 | ) | ||
698 | 742 | | |||
699 | # detect which folder the pri file should be installed into | | |||
700 | get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) | | |||
701 | | ||||
702 | function(query_qmake result_variable qt_variable) | | |||
703 | execute_process( | | |||
704 | COMMAND ${QMAKE_EXECUTABLE} -query "${qt_variable}" | | |||
705 | RESULT_VARIABLE return_code | | |||
706 | OUTPUT_VARIABLE output | | |||
707 | ) | | |||
708 | if(return_code EQUAL 0) | | |||
709 | string(STRIP "${output}" output) | | |||
710 | file(TO_CMAKE_PATH "${output}" output_path) | | |||
711 | set(${result_variable} "${output_path}" PARENT_SCOPE) | | |||
712 | else() | | |||
713 | message(WARNING "Failed call: ${QMAKE_EXECUTABLE} -query \"${qt_variable}\"") | | |||
714 | message(FATAL_ERROR "QMake call failed: ${return_code}") | | |||
715 | endif() | | |||
716 | endfunction() | | |||
717 | | ||||
718 | # if going to be installed into same prefix as Qt, then also use same folder | 743 | # if going to be installed into same prefix as Qt, then also use same folder | ||
719 | set(IS_SHARED_INSTALL_PREFIX FALSE) | 744 | set(IS_SHARED_INSTALL_PREFIX FALSE) | ||
720 | if(NOT DEFINED MARBLE_PRI_INSTALL_USE_QT_SYS_PATHS) | 745 | if(NOT DEFINED MARBLE_INSTALL_USE_QT_SYS_PATHS) | ||
721 | query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) | 746 | query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) | ||
722 | if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") | 747 | if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") | ||
723 | set(IS_SHARED_INSTALL_PREFIX TRUE) | 748 | set(IS_SHARED_INSTALL_PREFIX TRUE) | ||
724 | endif() | 749 | endif() | ||
725 | endif() | 750 | endif() | ||
726 | 751 | | |||
727 | if(MARBLE_PRI_INSTALL_USE_QT_SYS_PATHS OR IS_SHARED_INSTALL_PREFIX) | 752 | if(MARBLE_INSTALL_USE_QT_SYS_PATHS OR IS_SHARED_INSTALL_PREFIX) | ||
728 | query_qmake(qt_host_data_dir QT_HOST_DATA) | 753 | query_qmake(qt_host_data_dir QT_HOST_DATA) | ||
729 | set(PRI_INSTALL_DIR ${qt_host_data_dir}/mkspecs/modules) | 754 | set(PRI_INSTALL_DIR ${qt_host_data_dir}/mkspecs/modules) | ||
730 | else() | 755 | else() | ||
731 | set(PRI_INSTALL_DIR mkspecs/modules) | 756 | set(PRI_INSTALL_DIR mkspecs/modules) | ||
732 | endif() | 757 | endif() | ||
733 | set(MARBLE_PRI_INSTALL_DIR "${PRI_INSTALL_DIR}" CACHE PATH "The directory where the Marble pri file will be installed to.") | 758 | set(MARBLE_PRI_INSTALL_DIR "${PRI_INSTALL_DIR}" CACHE PATH "The directory where the Marble pri file will be installed to.") | ||
734 | 759 | | |||
735 | install(FILES | 760 | install(FILES | ||
736 | ${CMAKE_CURRENT_BINARY_DIR}/qt_Marble.pri | 761 | ${CMAKE_CURRENT_BINARY_DIR}/qt_Marble.pri | ||
737 | DESTINATION ${MARBLE_PRI_INSTALL_DIR} | 762 | DESTINATION ${MARBLE_PRI_INSTALL_DIR} | ||
738 | ) | 763 | ) |