Fix build on Windows (MinGW)

Review Request #127328 - Created March 10, 2016 and submitted

Information
Thomas Friedrichsmeier
okular
frameworks
Reviewers
okular
apol, arichardson, arrowdodger

Three parts to this patch:
1) The plaform #ifdef in interfaces/viewerinterface.h is platform, not compiler-specific.
2) When compiling okularplugin, the existing definition of okularpart_EXPORTS on the generated settings.cpp does not work with MinGW, for reasons that I do not understand. Setting the definition on the whole target, instead, works.
3) The okularpart lib will automatically be named libokularpart, and subsequently not be found when trying to load it via KPluginLoader. Tell cmake to drop the "lib"-prefix.

See also:
- Discussion on list https://mail.kde.org/pipermail/okular-devel/2016-March/022480.html
- A previous review request addressed issue 2 for MSVC https://git.reviewboard.kde.org/r/125742/

Builds on Windows with MinGW. Starts, and loads okularpart, successfully.

Issues

  • 2
  • 0
  • 0
  • 2
Description From Last Updated
Make it add_library(okularpart MODULE ${okularpart_SRCS}) and you won't need to drop the prefix. Aleix Pol Gonzalez Aleix Pol Gonzalez
Should use generate_export_header() and generate the export macros at configure time. Aleix Pol Gonzalez Aleix Pol Gonzalez
Thomas Friedrichsmeier
Aleix Pol Gonzalez
Gleb Popov
Gleb Popov
Thomas Friedrichsmeier
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit df0c41212fad2ade6f73b103e57062f99ae20de9 by Thomas Friedrichsmeier to branch frameworks.
Loading...