diff --git a/cmake/QtIRCommandLineHelpers.cmake b/cmake/QtIRCommandLineHelpers.cmake index b932fcdf..8856e980 100644 --- a/cmake/QtIRCommandLineHelpers.cmake +++ b/cmake/QtIRCommandLineHelpers.cmake @@ -427,11 +427,13 @@ endfunction() # Convert to absolute path if necessary. function(qt_ir_get_option_as_existing_absolute_path name value) qt_ir_get_option_value("${name}" path) - if(NOT EXISTS "${abspath}") - qt_ir_add_error("The path '${path}' passed with -${name} does not exist.") - endif() - if(NOT IS_ABSOLUTE "${path}") - get_filename_component(path "${path}" ABSOLUTE) + if(NOT "${path}" STREQUAL "") + if(NOT EXISTS "${path}") + qt_ir_add_error("The path '${path}' passed with -${name} does not exist.") + endif() + if(NOT IS_ABSOLUTE "${path}") + get_filename_component(path "${path}" ABSOLUTE) + endif() endif() set("${value}" "${path}" PARENT_SCOPE) endfunction()