Warning, /graphics/krita/plugins/extensions/pykrita/plugin/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # NOTE Disable trivial Qt keywords due conflicts w/ some Python.h header 0002 # (at least version 3.3 of it has a member PyType_Spec::slots) 0003 add_definitions(-DQT_NO_KEYWORDS) 0004 configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) 0005 0006 set(SOURCES 0007 plugin.cpp 0008 pyqtpluginsettings.cpp 0009 utilities.cpp 0010 PykritaModule.cpp 0011 PythonPluginManager.cpp 0012 PythonPluginsModel.cpp 0013 ) 0014 0015 ki18n_wrap_ui(SOURCES 0016 info.ui 0017 manager.ui 0018 ) 0019 0020 kis_add_library(kritapykrita MODULE ${SOURCES}) 0021 kis_add_library(pykrita STATIC ${SOURCES}) 0022 0023 target_include_directories(kritapykrita SYSTEM PUBLIC "${PYTHON_INCLUDE_DIRS}") 0024 target_include_directories(pykrita SYSTEM PUBLIC "${PYTHON_INCLUDE_DIRS}") 0025 0026 target_link_libraries( 0027 kritapykrita 0028 ${PYTHON_LIBRARY} 0029 kritaui 0030 kritalibkis 0031 ) 0032 0033 target_link_libraries( 0034 pykrita 0035 ${PYTHON_LIBRARY} 0036 kritaui 0037 kritalibkis 0038 ) 0039 0040 if (MINGW) 0041 target_compile_definitions(kritapykrita PRIVATE _hypot=hypot) 0042 target_compile_definitions(pykrita PRIVATE _hypot=hypot) 0043 endif() 0044 if (WIN32) 0045 # Banish Python 3.8 from mucking up Boost.Assert use of snprintf. 0046 # https://github.com/boostorg/system/issues/32 0047 target_compile_definitions(kritapykrita PRIVATE HAVE_SNPRINTF=1) 0048 target_compile_definitions(pykrita PRIVATE HAVE_SNPRINTF=1) 0049 endif (WIN32) 0050 0051 install(TARGETS kritapykrita DESTINATION ${KRITA_PLUGIN_INSTALL_DIR}) 0052 0053 # Install "built-in" api 0054 install( 0055 DIRECTORY krita 0056 DESTINATION ${LIB_INSTALL_DIR}/krita-python-libs 0057 FILES_MATCHING PATTERN "*.py" 0058 ) 0059