#5 Support Windows-style Visual Studio builds

Merged
necklace merged 2 commits from fanc999/msvc.build into necklace/master 3 years ago
fanc999 commented 3 years ago

Hi,

This attempts to improve the situation on building with Visual Studio for Windows, by:

  • Improving the search for libopenjpeg. The CMake build files for Visual Studio builds do not generate a pkg-config file for us but only generates a set of CMake config files, in which the package is not named as libopenjp2 but as OpenJPEG, so we should search for that as well on Visual Studio-style builds.

  • Mark fill_[vtable|info]() in io-jp2.c with G_MODULE_EXPORT so that these symbols are properly exported during the build on Visual Studio builds as well. Gdk-Pixbuf requires that these symbols are exported in order to load the loader.

The other thing that probably needs to be addressed but it not covered by this merge request is the default loader location in loaders.cache.in is hard-coded to a certain location, so it would be nice if that can be deduced at build time. By setting that path for myself manually, all the test programs pass successfully.

With blessings, thank you!

Hi, This attempts to improve the situation on building with Visual Studio for Windows, by: * Improving the search for libopenjpeg. The CMake build files for Visual Studio builds do not generate a pkg-config file for us but only generates a set of CMake config files, in which the package is not named as `libopenjp2` but as OpenJPEG, so we should search for that as well on Visual Studio-style builds. * Mark `fill_[vtable|info]()` in `io-jp2.c` with `G_MODULE_EXPORT` so that these symbols are properly exported during the build on Visual Studio builds as well. Gdk-Pixbuf requires that these symbols are exported in order to load the loader. The other thing that probably needs to be addressed but it not covered by this merge request is the default loader location in `loaders.cache.in` is hard-coded to a certain location, so it would be nice if that can be deduced at build time. By setting that path for myself manually, all the test programs pass successfully. With blessings, thank you!

Greatly appreciated! I don't use Windows so I'm not able to test at the moment, but it doesn't break building on Linux so I'll happily accept your patch.

I'll see if I can figure out how to fix the hard coded loaders.cache.in location whenever I get some spare time.

Thanks!

Greatly appreciated! I don't use Windows so I'm not able to test at the moment, but it doesn't break building on Linux so I'll happily accept your patch. I'll see if I can figure out how to fix the hard coded loaders.cache.in location whenever I get some spare time. Thanks!
This pull request has been merged successfully!
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.