Skip to content

Instantly share code, notes, and snippets.

@wbic16

wbic16/nuget.pri

Forked from leif81/nuget.pri
Created Mar 31, 2016
Embed
What would you like to do?
Poor man's way of adding NuGet packages to your QMake project
# Automatically adds all nuget packages to project file
NUGET_REPOSITORY_PATH = packages
NUGET_PACKAGES = $$system(dir $${NUGET_REPOSITORY_PATH} /B)
for (NUGET_PACKAGE, NUGET_PACKAGES) {
INCLUDEPATH += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/include
CONFIG(debug, debug | release) {
LIBS += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/lib/x64/v120/Debug/*.lib
} else {
LIBS += $$PWD/$${NUGET_REPOSITORY_PATH}/$${NUGET_PACKAGE}/build/native/lib/x64/v120/Release/*.lib
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment