CMake: Map dlopen feature to 'ON'

Map the dlopen feature to 'ON'. The effect is that cmake will figure
out whether or not linking to 'dl' is necessary or not.

The user-visible feature is 'library' anyway: That enables dynamic
library loading -- and will link in 'dl' as needed.

Change-Id: I0d68275a7234efba7f926150f120bb37b4a1163f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
Tobias Hunger 2019-01-31 16:20:32 +01:00
parent 25457f29db
commit 73f5036be5
2 changed files with 3 additions and 1 deletions

View File

@ -276,7 +276,7 @@ def map_condition(condition):
assert isinstance(condition, str)
mapped_features = {
"dlopen": "UNIX",
"dlopen": "ON",
'gbm': 'gbm_FOUND',
"system-xcb": "ON",
"system-freetype": "ON",

View File

@ -603,6 +603,8 @@ def map_condition(condition: str) -> str:
if feature.startswith('system_') and substitute_libs(feature[7:]) != feature[7:]:
# Qt6 always uses system libraries!
part = 'ON'
elif feature == 'dlopen':
part = 'ON'
else:
part = 'QT_FEATURE_' + feature
else: