diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:29:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:29:01 +0000 |
commit | 35a96bde514a8897f6f0fcc41c5833bf63df2e2a (patch) | |
tree | 657d15a03cc46bd099fc2c6546a7a4ad43815d9f /share/CMakeLists.txt | |
parent | Initial commit. (diff) | |
download | inkscape-upstream.tar.xz inkscape-upstream.zip |
Adding upstream version 1.0.2.upstream/1.0.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/CMakeLists.txt')
-rw-r--r-- | share/CMakeLists.txt | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt new file mode 100644 index 0000000..1c6c01b --- /dev/null +++ b/share/CMakeLists.txt @@ -0,0 +1,118 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +add_subdirectory(attributes) +add_subdirectory(branding) +add_subdirectory(examples) +add_subdirectory(filters) +add_subdirectory(fonts) +add_subdirectory(icons) +add_subdirectory(keys) +add_subdirectory(markers) +add_subdirectory(paint) +add_subdirectory(palettes) +add_subdirectory(screens) +add_subdirectory(symbols) +add_subdirectory(templates) +add_subdirectory(pixmaps) +add_subdirectory(tutorials) +add_subdirectory(ui) + +install(DIRECTORY extensions DESTINATION ${INKSCAPE_SHARE_INSTALL} + COMPONENT extensions + PATTERN ".git*" EXCLUDE + PATTERN "tests" EXCLUDE + PATTERN "*.pyc" EXCLUDE + ) + +if(WIN32) + install(CODE + "MESSAGE(\"Pre-compiling Python extensions to byte-code (.pyc files)\") + execute_process(COMMAND \${CMAKE_INSTALL_PREFIX}/bin/python -m compileall -qq \${CMAKE_INSTALL_PREFIX}/${INKSCAPE_SHARE_INSTALL})" + COMPONENT extensions) +endif() + + + + +# appdata and desktop files +if(UNIX) + if (ENABLE_BINRELOC) + set(INKSCAPE_ICONPATH "\${SNAP}/share/inkscape/branding/inkscape.svg") + else() + set(INKSCAPE_ICONPATH "org.inkscape.Inkscape") + endif() + set(INKSCAPE_MIMETYPE + "image/svg+xml" + "image/svg+xml-compressed" + "application/vnd.corel-draw" + "application/pdf" + "application/postscript" + "image/x-eps" + "application/illustrator" + "image/cgm" + "image/x-wmf" + "application/x-xccx" + "application/x-xcgm" + "application/x-xcdt" + "application/x-xsk1" + "application/x-xcmx" + "image/x-xcdr" + "application/visio" + "application/x-visio" + "application/vnd.visio" + "application/visio.drawing" + "application/vsd" + "application/x-vsd" + "image/x-vsd" + "" + ) + + configure_file(${CMAKE_SOURCE_DIR}/org.inkscape.Inkscape.desktop.template + ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop.in) + + if(ENABLE_NLS) + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop + DEPENDS ${LANGUAGES} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} + --desktop + --template ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop.in + -d ${CMAKE_SOURCE_DIR}/po + -o ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop + --keyword=Name + --keyword=GenericName + --keyword=X-GNOME-FullName + --keyword=Comment + --keyword=Keywords + ) + add_custom_target(inkscape_desktop ALL DEPENDS ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop) + + add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.appdata.xml + DEPENDS ${LANGUAGES} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} + --xml + --template ${CMAKE_SOURCE_DIR}/org.inkscape.Inkscape.appdata.xml.in + -d ${CMAKE_SOURCE_DIR}/po -o ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.appdata.xml + ) + add_custom_target(inkscape_appdata ALL DEPENDS ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.appdata.xml) + else() + configure_file(${CMAKE_SOURCE_DIR}/org.inkscape.Inkscape.appdata.xml.in ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.appdata.xml COPYONLY) + configure_file(${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop.in + ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop COPYONLY) + endif() + + + install(FILES ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.desktop + DESTINATION ${SHARE_INSTALL}/applications) + install(FILES ${CMAKE_BINARY_DIR}/org.inkscape.Inkscape.appdata.xml + DESTINATION ${SHARE_INSTALL}/metainfo) + install(FILES + ../AUTHORS + ../TRANSLATORS + ../COPYING + DESTINATION ${INKSCAPE_SHARE_INSTALL}/doc) + install(FILES + bash-completion/completions/inkscape + DESTINATION ${SHARE_INSTALL}/bash-completion/completions) + +endif() + + |