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 | | ||||
627 | if(BUILD_QCH) | ||||
628 | | ||||
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") | ||||
634 | endif() | ||||
635 | | ||||
636 | include(MarbleAddQCH) | ||||
637 | marble_add_qch( | ||||
638 | Marble_QCH | ||||
639 | OUTPUT_BASENAME Marble | ||||
640 | VERSION ${MARBLE_LIB_VERSION} | ||||
641 | ORG_DOMAIN org.kde | ||||
642 | SOURCES | ||||
643 | ${marble_HEADERS} | ||||
644 | LINK_QCHS | ||||
645 | Qt5Core_QCH | ||||
646 | Qt5Xml_QCH | ||||
647 | Qt5Gui_QCH | ||||
648 | Qt5Widgets_QCH | ||||
649 | BLANK_MACROS | ||||
650 | MARBLE_EXPORT | ||||
651 | MARBLE_DEPRECATED | ||||
652 | GEODATA_EXPORT | ||||
653 | GEODATA_DEPRECATED | ||||
654 | TAGFILE_INSTALL_DESTINATION ${MARBLE_QTQCH_FULL_INSTALL_DIR} | ||||
655 | QCH_INSTALL_DESTINATION ${MARBLE_QTQCH_FULL_INSTALL_DIR} | ||||
656 | ) | ||||
657 | | ||||
658 | endif() | ||||
659 | | ||||
660 | | ||||
623 | ########### CMake Config files ############### | 661 | ########### CMake Config files ############### | ||
624 | 662 | | |||
625 | include(CMakePackageConfigHelpers) | 663 | include(CMakePackageConfigHelpers) | ||
626 | 664 | | |||
627 | set(MARBLE_CMAKECONFIGNAME Marble) | 665 | set(MARBLE_CMAKECONFIGNAME Marble) | ||
628 | set(MARBLE_INSTALL_CMAKECONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${MARBLE_CMAKECONFIGNAME}) | 666 | set(MARBLE_INSTALL_CMAKECONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${MARBLE_CMAKECONFIGNAME}) | ||
629 | 667 | | |||
630 | configure_package_config_file(MarbleConfig.cmake.in | 668 | configure_package_config_file(MarbleConfig.cmake.in | ||
Show All 14 Lines | |||||
645 | ) | 683 | ) | ||
646 | 684 | | |||
647 | install( | 685 | install( | ||
648 | EXPORT MarbleTargets | 686 | EXPORT MarbleTargets | ||
649 | FILE ${MARBLE_CMAKECONFIGNAME}Targets.cmake | 687 | FILE ${MARBLE_CMAKECONFIGNAME}Targets.cmake | ||
650 | DESTINATION ${MARBLE_INSTALL_CMAKECONFIGDIR} | 688 | DESTINATION ${MARBLE_INSTALL_CMAKECONFIGDIR} | ||
651 | ) | 689 | ) | ||
652 | 690 | | |||
691 | marble_install_qch_export( | ||||
692 | TARGETS Marble_QCH | ||||
693 | FILE ${MARBLE_CMAKECONFIGNAME}QCHTargets.cmake | ||||
694 | DESTINATION "${MARBLE_INSTALL_CMAKECONFIGDIR}" | ||||
695 | COMPONENT Devel | ||||
696 | ) | ||||
697 | | ||||
653 | 698 | | |||
654 | ########### Qt Pri file ############### | 699 | ########### Qt Pri file ############### | ||
655 | 700 | | |||
656 | # Where the pri file is installed is defined by the following rules, with decreasing priority: | 701 | # Where the pri file is installed is defined by the following rules, with decreasing priority: | ||
657 | # * MARBLE_PRI_INSTALL_USE_QT_SYS_PATHS=TRUE: | 702 | # * MARBLE_INSTALL_USE_QT_SYS_PATHS=TRUE: | ||
658 | # pri file will be installed with the dirs of the Qt installation used | 703 | # pri file will be installed with the dirs of the Qt installation used | ||
659 | # * MARBLE_PRI_INSTALL_DIR=some-relative-or-absolute-path | 704 | # * MARBLE_PRI_INSTALL_DIR=some-relative-or-absolute-path | ||
660 | # if set will be used as given | 705 | # if set will be used as given | ||
661 | # * installation prefix = Qt installation prefix: | 706 | # * installation prefix = Qt installation prefix: | ||
662 | # pri file will be installed with the dirs of the Qt installation used | 707 | # pri file will be installed with the dirs of the Qt installation used | ||
663 | # * otherwise: | 708 | # * otherwise: | ||
664 | # pri file will be installed in mkspecs/modules in the installation prefix | 709 | # pri file will be installed in mkspecs/modules in the installation prefix | ||
665 | 710 | | |||
Show All 25 Lines | |||||
691 | QT.Marble.defines = | 736 | QT.Marble.defines = | ||
692 | QT.Marble.includes = ${PRI_ABS_INCLUDE_INSTALL_DIR} | 737 | QT.Marble.includes = ${PRI_ABS_INCLUDE_INSTALL_DIR} | ||
693 | QT.Marble.private_includes = | 738 | QT.Marble.private_includes = | ||
694 | QT.Marble.libs = ${PRI_ABS_LIB_INSTALL_DIR} | 739 | QT.Marble.libs = ${PRI_ABS_LIB_INSTALL_DIR} | ||
695 | QT.Marble.depends = ${PRI_DEPS} | 740 | QT.Marble.depends = ${PRI_DEPS} | ||
696 | " | 741 | " | ||
697 | ) | 742 | ) | ||
698 | 743 | | |||
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 | 744 | # if going to be installed into same prefix as Qt, then also use same folder | ||
719 | set(IS_SHARED_INSTALL_PREFIX FALSE) | 745 | set(IS_SHARED_INSTALL_PREFIX FALSE) | ||
720 | if(NOT DEFINED MARBLE_PRI_INSTALL_USE_QT_SYS_PATHS) | 746 | if(NOT DEFINED MARBLE_INSTALL_USE_QT_SYS_PATHS) | ||
721 | query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) | 747 | query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) | ||
722 | if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") | 748 | if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") | ||
723 | set(IS_SHARED_INSTALL_PREFIX TRUE) | 749 | set(IS_SHARED_INSTALL_PREFIX TRUE) | ||
724 | endif() | 750 | endif() | ||
725 | endif() | 751 | endif() | ||
726 | 752 | | |||
727 | if(MARBLE_PRI_INSTALL_USE_QT_SYS_PATHS OR IS_SHARED_INSTALL_PREFIX) | 753 | if(MARBLE_INSTALL_USE_QT_SYS_PATHS OR IS_SHARED_INSTALL_PREFIX) | ||
728 | query_qmake(qt_host_data_dir QT_HOST_DATA) | 754 | query_qmake(qt_host_data_dir QT_HOST_DATA) | ||
729 | set(PRI_INSTALL_DIR ${qt_host_data_dir}/mkspecs/modules) | 755 | set(PRI_INSTALL_DIR ${qt_host_data_dir}/mkspecs/modules) | ||
730 | else() | 756 | else() | ||
731 | set(PRI_INSTALL_DIR mkspecs/modules) | 757 | set(PRI_INSTALL_DIR mkspecs/modules) | ||
732 | endif() | 758 | endif() | ||
733 | set(MARBLE_PRI_INSTALL_DIR "${PRI_INSTALL_DIR}" CACHE PATH "The directory where the Marble pri file will be installed to.") | 759 | set(MARBLE_PRI_INSTALL_DIR "${PRI_INSTALL_DIR}" CACHE PATH "The directory where the Marble pri file will be installed to.") | ||
734 | 760 | | |||
735 | install(FILES | 761 | install(FILES | ||
736 | ${CMAKE_CURRENT_BINARY_DIR}/qt_Marble.pri | 762 | ${CMAKE_CURRENT_BINARY_DIR}/qt_Marble.pri | ||
737 | DESTINATION ${MARBLE_PRI_INSTALL_DIR} | 763 | DESTINATION ${MARBLE_PRI_INSTALL_DIR} | ||
738 | ) | 764 | ) |