Fix configure failure when optional packages are missing.

When find_package(KF5 CONFIG REQUIRED) is called, any subsequent
find_package(KF5) calls will be marked as required too. So,
find optional frameworks separately to avoid configure failure
if they are missing.

Also add information about the status of the optional packages
to the feature summary.

REVIEW: 117728
This commit is contained in:
Michael Palimaka 2014-04-24 04:28:30 +10:00
parent 8e63102855
commit 801873b216

View file

@ -76,7 +76,19 @@ find_package(KF5 CONFIG REQUIRED COMPONENTS
)
# optional frameworks
find_package(KF5 CONFIG COMPONENTS Activities DocTools)
find_package(KF5Activities CONFIG)
set_package_properties(KF5Activities PROPERTIES
PURPOSE "Enable building of KWin with kactivities support"
TYPE OPTIONAL
)
add_feature_info("KF5Activities" KF5Activities_FOUND "Enable building of KWin with kactivities support")
find_package(KF5DocTools CONFIG)
set_package_properties(KF5DocTools PROPERTIES
PURPOSE "Enable building documentation"
TYPE OPTIONAL
)
add_feature_info("KF5DocTools" KF5DocTools_FOUND "Enable building documentation")
if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL")
find_package(OpenGL)