Glob for .h/.cpp files in qmake file

This commit is contained in:
miruka 2020-07-16 13:50:06 -04:00
parent 292d88a9bf
commit cc8d552adc

View File

@ -1,3 +1,15 @@
# Custom functions
defineReplace(glob_filenames) {
for(pattern, ARGS) {
results *= $$files(src/$${pattern}, true)
}
return($$results)
}
# Base configuration
# widgets: Make native file dialogs available to QML (must use QApplication) # widgets: Make native file dialogs available to QML (must use QApplication)
QT = quick quickcontrols2 widgets QT = quick quickcontrols2 widgets
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
@ -12,8 +24,8 @@ RCC_DIR = $$BUILD_DIR/rcc
QRC_FILE = $$BUILD_DIR/resources.qrc QRC_FILE = $$BUILD_DIR/resources.qrc
RESOURCES += $$QRC_FILE RESOURCES += $$QRC_FILE
HEADERS += src/utils.h src/clipboard.h submodules/hsluv-c/src/hsluv.h HEADERS += $$glob_filenames(*.h) submodules/hsluv-c/src/hsluv.h
SOURCES += src/main.cpp submodules/hsluv-c/src/hsluv.c SOURCES += $$glob_filenames(*.cpp) submodules/hsluv-c/src/hsluv.c
TARGET = mirage TARGET = mirage
unix:!macx { unix:!macx {
@ -58,16 +70,6 @@ dev {
} }
# Custom functions
defineReplace(glob_filenames) {
for(pattern, ARGS) {
results *= $$files(src/$${pattern}, true)
}
return($$results)
}
# Generate resource file # Generate resource file
RESOURCE_FILES *= $$glob_filenames(qmldir, *.qml, *.qpl, *.js, *.py) RESOURCE_FILES *= $$glob_filenames(qmldir, *.qml, *.qpl, *.js, *.py)