Partially revert "Require CMake 3.4 and use the OpenSSL imported libs"
ClosedPublic

Authored by sitter on Apr 9 2019, 1:57 PM.

Details

Summary

This reverts the QcaMacro changes of
commit 1137ed5f07d137296874f7dd1ee629f903507161 as they seem fairly
unrelated to the actual openssl change and proof to cause persistent issues
with buildability.

Further revert "unbreak build by moving away from deprecated exec_program"
This reverts commit 32419c899c77b8f5ece374d2453ee37e89af7c10.
Which was done in an attempt to remidy the build problems.

Further revert "Actually abort after the message that tells people to set CMAKE_INSTALL_PREFIX"
This reverts commit 63fd27fbce780bccb9c9b3ff6649888cfd809c6a.
Which was also done in an attempt to fix the problems.

BUG: 406353

Test Plan
  • when configuring without any arguments the qmake derived paths are used and correct
  • when configuring with CMAKE_INSTALL_PREFIX the paths are accordingly reported below that

QCA prefix is /opt
Plugins will be installed to /opt/lib/qca-qt5
Binary will be installed to /opt/bin
Library will be installed to /opt/lib
Public headers will be installed to /opt/include/Qca-qt5
Private headers will be installed to /opt/include/Qca-qt5
Feature file will be installed to /opt/mkspecs/features
Documentation will be installed to /opt/share/doc/qca-qt5/html
Man page will be installed to /opt/share/man
Pkg-config file will be installed to /opt/lib/pkgconfig

Diff Detail

Repository
R486 QCA Library
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter requested review of this revision.Apr 9 2019, 1:57 PM
sitter created this revision.
arojas accepted this revision.Apr 9 2019, 2:09 PM

This fixes build with -DQCA_INSTALL_IN_QT_PREFIX=ON

This revision is now accepted and ready to land.Apr 9 2019, 2:09 PM
dfaure accepted this revision.Apr 10 2019, 12:12 PM

Oh, I see, the message "you MUST explicity define CMAKE_INSTALL_PREFIX" had an "If" above, I missed that, sorry.

This revision was automatically updated to reflect the committed changes.

This change has broken builds on Windows
https://binary-factory.kde.org/job/Craft_Build_Cache_windows-msvc2017_64-cl-debug/lastFailedBuild/console

Can we revert this please, especially with regards to the install_pdb macro?

I do not know if the pdb change is correct. It was smashed into a seemingly unrelated change for ossl library imports, the commit message explains neither the intent nor purpose of any of the changes in QcaMacro and @vonreth hasn't really commented on any of the discussion surrounding the regressions caused by that originally faulty commit. So I genuinely do not feel comfortable doing anything on this file.

The build you posted seems more hung up on a cmake regression (I am guessing) since it raises errors where it should raise deprecation warnings as per https://cmake.org/cmake/help/v3.12/policy/CMP0026.html and I do see the build passing on cmake 3.13.4. That said if someone can check that explicitly setting cmake_policy(SET CMP0026 OLD) fixes it I think that'd be a reasonable way to fix it without risking regressions in lieu of verification that the pdb change is in fact sound.

I'll ask Hannah to take a look. Given the PDB code is Windows only and the code prior to this change works on Windows fine, I suspect that change is very much needed to make Windows work properly.

@vonreth can you confirm?

I can't remember all details of why I touched the pdb code, but it was broken and obviously hard to read.
So instead of investigating how to make it work I replaced it with a modern solution.

I'm not following phabricator that active because in recent times people add me as a build bot instead of booting Windows.