Warning, /graphics/krita/plugins/python/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2012, 2013 Shaheed Haque <srhaque@theiet.org> 0002 # SPDX-FileCopyrightText: 2013 Alex Turbov <i.zaufi@gmail.com> 0003 # SPDX-FileCopyrightText: 2014-2016 Boudewijn Rempt <boud@valdyas.org> 0004 # 0005 # SPDX-License-Identifier: BSD-2-Clause 0006 0007 include(CMakeParseArguments) 0008 0009 # 0010 # Simple helper function to install plugin and related files 0011 # having only a name of the plugin... 0012 # (just to reduce syntactic noise when a lot of plugins get installed) 0013 # 0014 function(install_pykrita_plugin name) 0015 set(_options) 0016 set(_one_value_args) 0017 set(_multi_value_args PATTERNS FILE) 0018 cmake_parse_arguments(install_pykrita_plugin "${_options}" "${_one_value_args}" "${_multi_value_args}" ${ARGN}) 0019 if(NOT name) 0020 message(FATAL_ERROR "Plugin filename is not given") 0021 endif() 0022 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py) 0023 install(FILES kritapykrita_${name}.desktop DESTINATION ${DATA_INSTALL_DIR}/krita/pykrita) 0024 foreach(_f ${name}.py ${name}.ui ${install_pykrita_plugin_FILE}) 0025 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_f}) 0026 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_f} DESTINATION ${DATA_INSTALL_DIR}/krita/pykrita) 0027 endif() 0028 endforeach() 0029 elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${name}) 0030 install(FILES ${name}/kritapykrita_${name}.desktop DESTINATION ${DATA_INSTALL_DIR}/krita/pykrita) 0031 install( 0032 DIRECTORY ${name} 0033 DESTINATION ${DATA_INSTALL_DIR}/krita/pykrita 0034 FILES_MATCHING 0035 PATTERN "*.py" 0036 PATTERN "*.ui" 0037 PATTERN "*.txt" 0038 PATTERN "*.csv" 0039 PATTERN "*.html" 0040 PATTERN "__pycache__*" EXCLUDE 0041 PATTERN "tests*" EXCLUDE 0042 ) 0043 # TODO Is there any way to form a long PATTERN options string 0044 # and use it in a single install() call? 0045 # NOTE Install specified patterns one-by-one... 0046 foreach(_pattern ${install_pykrita_plugin_PATTERNS}) 0047 install( 0048 DIRECTORY ${name} 0049 DESTINATION ${DATA_INSTALL_DIR}/krita/pykrita 0050 FILES_MATCHING 0051 PATTERN "${_pattern}" 0052 PATTERN "__pycache__*" EXCLUDE 0053 PATTERN "tests*" EXCLUDE 0054 ) 0055 endforeach() 0056 else() 0057 message(FATAL_ERROR "Do not know what to do with ${name}") 0058 endif() 0059 endfunction() 0060 0061 install_pykrita_plugin(assignprofiledialog) 0062 install_pykrita_plugin(scripter) 0063 install_pykrita_plugin(colorspace) 0064 install_pykrita_plugin(documenttools) 0065 install_pykrita_plugin(filtermanager) 0066 install_pykrita_plugin(exportlayers) 0067 install_pykrita_plugin(batch_exporter) 0068 #install_pykrita_plugin(highpass) 0069 install_pykrita_plugin(tenbrushes) 0070 install_pykrita_plugin(tenscripts) 0071 #install_pykrita_plugin(palette_docker) # Needs fixing -> bug 405194 0072 install_pykrita_plugin(quick_settings_docker) 0073 install_pykrita_plugin(lastdocumentsdocker) 0074 # install_pykrita_plugin(scriptdocker) 0075 install_pykrita_plugin(comics_project_management_tools) 0076 install_pykrita_plugin(krita_script_starter) 0077 install_pykrita_plugin(plugin_importer) 0078 install_pykrita_plugin(mixer_slider_docker) 0079 install_pykrita_plugin(channels2layers) 0080 install_pykrita_plugin(photobash_images) 0081 0082 # if(PYTHON_VERSION_MAJOR VERSION_EQUAL 3) 0083 # install_pykrita_plugin(cmake_utils) 0084 # install_pykrita_plugin(js_utils PATTERNS "*.json") 0085 # install_pykrita_plugin(expand PATTERNS "*.expand" "templates/*.tpl") 0086 # endif() 0087 0088 install( FILES 0089 tenbrushes/tenbrushes.action 0090 tenscripts/tenscripts.action 0091 plugin_importer/plugin_importer.action 0092 DESTINATION ${DATA_INSTALL_DIR}/krita/actions) 0093 0094 install( 0095 DIRECTORY libkritapykrita 0096 DESTINATION ${DATA_INSTALL_DIR}/krita/pykrita 0097 FILES_MATCHING 0098 PATTERN "*.py" 0099 PATTERN "__pycache__*" EXCLUDE 0100 )