Warning, /graphics/digikam/core/utilities/geolocation/marble/plugins/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # 0002 # SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier, <caulier dot gilles at gmail dot com> 0003 # 0004 # SPDX-License-Identifier: BSD-3-Clause 0005 # 0006 0007 APPLY_COMMON_POLICIES() 0008 0009 include(CMakeParseArguments) 0010 0011 # ------------------------------------------------------------------------- 0012 0013 # This macro implement the rules to compile and link a marble plugin with extra arguments. 0014 # 0015 # Usage: marble_add_plugin(NAME _plugin_name_ 0016 # SOURCE _plugin_sources_ 0017 # DEPENDS _plugin_dependencies_) 0018 # 0019 # With: _plugin_name_ the literal name of the plugin (mandatory). 0020 # _plugin_sources_ the list of source codes to compile (mandatory). 0021 # _plugin_dependencies_ the list of dependencies to link (optional). 0022 # 0023 macro(marble_add_plugin) 0024 0025 set(_OPTIONS_ARGS) 0026 set(_ONE_VALUE_ARGS) 0027 set(_MULTI_VALUE_ARGS NAME SOURCES DEPENDS) 0028 0029 cmake_parse_arguments(_parse_results "${_OPTIONS_ARGS}" 0030 "${_ONE_VALUE_ARGS}" 0031 "${_MULTI_VALUE_ARGS}" 0032 ${ARGN} 0033 ) 0034 0035 # Mandatory 0036 if(NOT _parse_results_NAME) 0037 message(FATAL_ERROR "Marble plugin name is required.") 0038 endif() 0039 0040 if(NOT _parse_results_SOURCES) 0041 message(FATAL_ERROR "Marble plugin sources is required.") 0042 endif() 0043 0044 if(APPLE) 0045 set(_extra_deps /System/Library/Frameworks/AppKit.framework) 0046 endif() 0047 0048 add_library(${_parse_results_NAME} 0049 MODULE ${_parse_results_SOURCES}) 0050 0051 target_link_libraries(${_parse_results_NAME} 0052 0053 PRIVATE 0054 0055 digikamcore 0056 0057 Qt${QT_VERSION_MAJOR}::Core 0058 Qt${QT_VERSION_MAJOR}::Gui 0059 Qt${QT_VERSION_MAJOR}::Xml 0060 Qt${QT_VERSION_MAJOR}::Widgets 0061 Qt${QT_VERSION_MAJOR}::Network 0062 Qt${QT_VERSION_MAJOR}::Svg 0063 0064 KF${QT_VERSION_MAJOR}::I18n 0065 0066 PNG::PNG # For zlib 0067 0068 ${_parse_results_DEPENDS} 0069 ${_extra_deps} 0070 ) 0071 0072 if(Qt6_FOUND) 0073 0074 target_link_libraries(${_parse_results_NAME} 0075 0076 PRIVATE 0077 0078 Qt${QT_VERSION_MAJOR}::SvgWidgets 0079 ) 0080 0081 endif() 0082 0083 install(TARGETS ${_parse_results_NAME} 0084 DESTINATION ${KDE_INSTALL_FULL_PLUGINDIR}/digikam/marble 0085 ) 0086 0087 endmacro() 0088 0089 add_subdirectory(render) 0090 add_subdirectory(runner)