Skip to content

Instantly share code, notes, and snippets.

@mjakeman
Created October 26, 2022 22:43
Show Gist options
  • Save mjakeman/be109edfb63c0b0f85360cbdf8351747 to your computer and use it in GitHub Desktop.
Save mjakeman/be109edfb63c0b0f85360cbdf8351747 to your computer and use it in GitHub Desktop.
Inkscape CLion setup

Setting up Inkscape with CLion

These instructions are for macOS:

CMake options:

First set up cmake to check homebrew for dependencies.

We do this inside Preferences->Build, Execution, Deployment->CMake.

Use the following options:

-DCMAKE_SHARED_LINKER_FLAGS="-L/opt/homebrew/lib" -DCMAKE_EXE_LINKER_FLAGS="-L/opt/homebrew/lib" -DCMAKE_INSTALL_PREFIX=/Users/USER_NAME/inkscape-install-prefix -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DWITH_DBUS=OFF

image

Environment variables:

There are a few non-standard dependencies which homebrew does not add to the path for you. Change the environment variables to include the following PKG_CONFIG_PATH and PATH changes:

PKG_CONFIG_PATH=/opt/homebrew/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/libsoup@2/lib/pkgconfig:/opt/homebrew/opt/libxslt/lib/pkgconfig:/opt/homebrew/opt/libxml2/lib/pkgconfig;PATH=/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin

You may need to change /opt/homebrew if you are using a different prefix.

image

Run configuration:

Build the project. CLion should automatically populate the run configuration drop-down with a number of projects.

We want to find the inkscape project and set it to install before running. This ensures resources inkscape needs at runtime (like icons, ui files, etc) are found.

You can also add debug variables here if needed.

Replace ‘Build’ with ‘Install’:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment