Skip to content

Fix LibMyPaint building issues on Windows

Amy spark requested to merge lsegovia/krita:work/amyspark/fix-libmypaint into master

This MR fixes the following issues I found on Windows:

  • Add configuration-based library lookup. @rempt patched in a CMake toolchain, so I tacked the rest of the missing logic (library name, dependencies, and version)
  • Standardize configuration lookup. The existing module used a mix of "LIBMYPAINT", "LibMyPaint", and "libmypaint" as library names.
  • Support pkg-config correctly. If installed from 3rdparty on Linux, the CMake toolchain did not install the .pc file -- but the Find module would still try to look it up, and thus it'd fail to find the library version, making it fail the lookup whole. I tackled this along with the configuration files for Windows.
  • Several classes were labeled as PAINTOP_EXPORT -- which, on Windows, marks them as dllimport, not dllexport (we're using libpaintop here, not declaring it).

Test Plan

Build Krita on Windows from scratch.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Amy spark

Merge request reports