From 73f5036be58c52ab0c8a101e5e34ea6de12b9a29 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 31 Jan 2019 16:20:32 +0100 Subject: [PATCH] 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 Reviewed-by: Frederik Gladhorn --- util/cmake/configurejson2cmake.py | 2 +- util/cmake/pro2cmake.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 03625da1a5c..770f7588a3e 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -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", diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index 6d63461e0da..4f4303e3d18 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -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: