summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-05-03 14:08:17 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-05-03 13:39:48 +0000
commit9618434de56644fb61a76d4a3eb2176d629023fc (patch)
tree960c6404b37f9552a00cb34c4cc16f13d20b8e62 /util
parentd8cdbc4f97b030e8ae93fa63f6a4b5fa7a56c4e8 (diff)
CMake: configurejson2cmake: Do not generate useless OPTIONALs
Do not set properties of packages to type OPTIONAL. That is the default anyway. Update generator script and generated files. Change-Id: I7a4d043b69c93ce8c2929a2e27ac6a07e4e6d8cc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/configurejson2cmake.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py
index 15cd9bab47..fc6f9845a6 100755
--- a/util/cmake/configurejson2cmake.py
+++ b/util/cmake/configurejson2cmake.py
@@ -270,9 +270,8 @@ def parseLib(ctx, lib, data, cm_fh, cmake_find_packages_set):
else:
cm_fh.write('qt_find_package({})\n'.format(newlib))
- cm_fh.write('set_package_properties({} PROPERTIES TYPE {})\n'
- .format(newlib, 'REQUIRED' if isRequired else 'OPTIONAL')
- )
+ if isRequired:
+ cm_fh.write('set_package_properties({} PROPERTIES TYPE REQUIRED)\n'.format(newlib))
def lineify(label, value, quote=True):
if value: