diff options
-rwxr-xr-x | util/cmake/pro2cmake.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index b842e9fcc3..a2ea6ce0bf 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -2578,7 +2578,10 @@ def write_wayland_part(cm_fh: typing.IO[str], target: str, scope:Scope, indent: if len(client_sources) == 0 and len(server_sources) == 0: return - condition = map_to_cmake_condition(scope.total_condition) + condition = "ON" + if scope.total_condition: + condition = map_to_cmake_condition(scope.total_condition) + if condition != "ON": cm_fh.write(f"\n{spaces(indent)}if({condition})\n") indent += 1 @@ -2946,6 +2949,8 @@ def write_example( cm_fh.write(")\n") + write_wayland_part(cm_fh, binary_name, scope, indent=0) + write_include_paths( cm_fh, scope, f"target_include_directories({binary_name} PUBLIC", indent=0, footer=")" ) |