These instructions are for macOS:
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
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.
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’: