11

According to the documentation, regarding autouic:

If a preprocessor #include directive is found which matches ui_.h, and a .ui file exists, then uic will be executed to generate the appropriate file.

But what if the .ui file is in another folder? I currently get the following error when trying to build:

AUTOUIC : error : process for ui_module.h failed:
File 'C:/app/source/headers/module.ui' is not valid

The ui file is actually located here:

C:/app/source/forms/module.ui

I've tried to add the C:/app/source/forms/ to the include_directories()-macro without success. Any ideas?

2 Answers 2

12

Issue mentioned in this answer is now resolved.

This worked in CMake v3.9.0-rc6:

set(CMAKE_AUTOUIC_SEARCH_PATHS your/folder/here)

See documentation of AUTOUIC_SEARCH_PATHS.

8

Update

A search path, CMAKE_AUTOUIC_SEARCH_PATHS, has been added to CMake version 3.9.


After further investigation, it seems like it's not possible to do. There is an open issue in their tracking system, but it is so far not implemented:

Add Search path for AUTOUIC

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.