Skip to content

Instantly share code, notes, and snippets.

@leif81
Last active October 31, 2018 10:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save leif81/38c578e13d24fd351b63 to your computer and use it in GitHub Desktop.
Save leif81/38c578e13d24fd351b63 to your computer and use it in GitHub Desktop.
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