Solved GLOB or regex in source
-
I would like to add all the files from the directory. I did it this way.
SOURCES += ./source/*
I also tried so source/* , source*, .\source*
But this does not work, an error occurs$ qmake.exe ..
WARNING: Failure to find: source\*
WARNING: Failure to find: source\*What am I doing wrong?
-
Hi
Normally itsSOURCES += *.cpp HEADERS += *.h so maybe SOURCES += source/*.cpp HEADERS += source/*.h
Update: Nope. This works.
SOURCES += $$PWD$$/source/*.cpp HEADERS += $$PWD$$/source/*.h
Note that it will complain if it dont find at least one cpp and .h
-
@danyal said in GLOB or regex in source:
$ qmake.exe ..
Are you calling
qmake
from a subdir? What happens if you call it from the directory the.pro
file is in? -
@mrjj SOURCES += source/*.cpp does not work
WARNING: Failure to find: source*.cpp
WARNING: Failure to find: source*.cpp -
Hi
Just testedSOURCES += $$PWD$$/source/*.cpp HEADERS += $$PWD$$/source/*.h
and files was found and included.
Note that it will complain if it dont find at least one cpp and 1 .h
Also this assumes that source is a subfolder to the folder where .pro is. -
@mrjj it is work . thanks
-
@danyal Then please mark this thread as SOLVED.
-
@aha_1980 Yes you are right. So it works too
-
-
@aha_1980 How can i do this?
-
-