Add FindSeccomp to find-modules
ClosedPublic

Authored by davidk on Nov 25 2017, 3:08 PM.

Details

Summary

This is copied from KScreenlocker, but will be utilized in Baloo too.

Test Plan
  • Autotests are working
  • KScreenlocker and Baloo build with seccomp enabled

Diff Detail

Repository
R240 Extra CMake Modules
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidk created this revision.Nov 25 2017, 3:08 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptNov 25 2017, 3:08 PM
Restricted Application added subscribers: Build System, Frameworks. · View Herald Transcript
davidk requested review of this revision.Nov 25 2017, 3:08 PM
davidk added inline comments.Nov 25 2017, 3:11 PM
find-modules/FindSeccomp.cmake
51–56

I'm not sure about this. @graesslin is this nessecarry? Most find-modules don't check for the CMake version, and we don't do anything special here.

graesslin added inline comments.Nov 25 2017, 6:24 PM
find-modules/FindSeccomp.cmake
51–56

No idea, that's copy pasted from some other cmake modules.

davidk added inline comments.Nov 25 2017, 6:43 PM
find-modules/FindSeccomp.cmake
51–56

Well, based on the fact that no other find-module includes such a check, I will remove it.

davidk updated this revision to Diff 22931.Nov 25 2017, 6:45 PM

Remove apparently unneeded version check

davidk marked 3 inline comments as done.Nov 25 2017, 6:45 PM
krop added a subscriber: krop.Nov 26 2017, 9:57 AM
krop added inline comments.
find-modules/FindSeccomp.cmake
13

so, what about naming your variables Seccomp_LIBRARIES and Seccomp_INCLUDE_DIRS in the file ?

25

One author per line

57

Seccomp_INCLUDE_DIRS

63

Seccomp_LIBRARIES

75–76

same thing here

84–86

and there

90

here as well

davidk updated this revision to Diff 22958.Nov 26 2017, 1:55 PM

Fix variable names

davidk marked 7 inline comments as done.Nov 26 2017, 1:58 PM

Thank you, missed this when renaming the docs.

find-modules/FindSeccomp.cmake
13

Well....I'm for it! ;)

krop added a comment.Nov 27 2017, 4:06 PM

Mostly good. Last question : is the version important ? If yes, please add an additional way to get the version if Seccomp_VERSION is empty. (you can parse seccomp.h to find it, look at the other Find*.cmake modules for examples)

find-modules/FindSeccomp.cmake
4

nitpick : missing 2 dashes

52

Also add the QUIET keyword here

55

This doesn't look useful. Looking at my pkgconfig file, the cflags just adds the include dir.

If neither baloo or kscreenlocker use it, just remove this line and #85.

davidk updated this revision to Diff 24751.Jan 5 2018, 7:54 AM
davidk marked an inline comment as done.

Fix remaining problems

davidk marked 8 inline comments as not done.Jan 5 2018, 7:55 AM
davidk marked 2 inline comments as not done.
davidk marked 14 inline comments as done.Jan 5 2018, 11:00 AM

@cgiboudeaux is it ready to go now?

krop accepted this revision.Jan 28 2018, 9:47 AM
krop added inline comments.
find-modules/FindSeccomp.cmake
22

5.44.0

This revision is now accepted and ready to land.Jan 28 2018, 9:47 AM
davidk updated this revision to Diff 26106.Jan 28 2018, 9:49 AM

Fix version.

This revision was automatically updated to reflect the committed changes.

Thanks for your review.