diff options
Diffstat (limited to 'util/cmake/pro2cmake.py')
-rwxr-xr-x | util/cmake/pro2cmake.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index efc57e26e9..0b81cb10e1 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -1865,6 +1865,8 @@ def write_main_part(cm_fh: typing.IO[str], name: str, typename: str, # Check for DESTDIR override destdir = scope.get_string('DESTDIR') if destdir: + if destdir.startswith('./') or destdir.startswith('../'): + destdir = '${CMAKE_CURRENT_BINARY_DIR}/' + destdir extra_lines.append('OUTPUT_DIRECTORY "{}"'.format(destdir)) cm_fh.write('{}{}({}\n'.format(spaces(indent), cmake_function, name)) |