Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt Creator: How to use environment variables in the "project.includes" file when using Qt Creator as a code editor only (makefile project)

I am using Qt Creator as a Code Editor for a Makefile project (created by New File or Project -> Import Project -> Import Existing Project).

Qt Creator creates an empty "projectname.includes" file. I maintain this file manually to resolve code parser / indexing dependencies and pass include paths line by line. This works perfectly fine for relative include paths.

However, I have a project which depends on another library which is located in an arbitrary directory. I have an environment variable set for this library called "LIB_HOME".

Is it possible to use this environment variable in the project.includes file?

I tried

$(LIB_HOME)/Inc
%LIB_HOME%/Inc

But that does not work

OS is windows, Qt Creator version is 4.03

like image 783
yussuf Avatar asked May 05 '26 08:05

yussuf


1 Answers

While writing this question i stumbled across the answer:

$$(LIB_HOME)/Inc

does the trick.

like image 164
yussuf Avatar answered May 08 '26 06:05

yussuf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!