Fix build with CMake 3.15

Authored by adridg on Aug 10 2019, 7:54 PM.

Description

Fix build with CMake 3.15

Summary:

  • The build flags for the C part of the library overwrite the compile flags for C++, in particular, they add -std=c99 to the C++ compilation.
  • The C parts get auto-mocced (!) which generates a C++ file (although it's empty), which then gets compiled with the C flags (and weird -std= setting).
  • For clang, that leads to a build failure.

So switch out some things:

  • Build the C parts as an OBJECT library,
  • Don't apply the C flags to anything but that OBJECT library,
  • and don't automoc C code.

Test Plan: It now builds when CMake 3.15.2 is used.

Reviewers: leinir

Differential Revision: https://phabricator.kde.org/D23076

Details

Committed
adridgMay 28 2020, 11:25 AM
Differential Revision
D23076: Fix build with CMake 3.15
Parents
R157:811fa567c785: GIT_SILENT: add Peruse icon as repository logo
Branches
Unknown
Tags
Unknown