Skip to content

Commit

Permalink
Use SC_DEFAULT_APIKEY from the environment if available
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
navv1234 committed Aug 6, 2016
1 parent 7f8cb55 commit ab0f7da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/cli.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ win32 {
}

# Deployment for Linux
unix:!mac {
unix:!macx {
DISTFILES += CHANGES COPYING
INSTALLS += target profiles
# Disable strip
Expand Down
2 changes: 1 addition & 1 deletion gui/gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ win32 {
}

# Deplopyment for Linux, note, the cli project also copies profiles
unix:!mac {
unix:!macx {
DISTFILES += CHANGES COPYING
INSTALLS += target profiles data icon locale
# Disable strip
Expand Down
7 changes: 7 additions & 0 deletions lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ win32 {
QMAKE_PROJECT_NAME = "Simulationcraft Engine"
}

# If apikey is in environment, use that
ENV_APIKEY=$$(SC_DEFAULT_APIKEY)
!isEmpty(ENV_APIKEY) {
SC_DEFAULT_APIKEY=$$(SC_DEFAULT_APIKEY)
}

!isEmpty(SC_DEFAULT_APIKEY) {
DEFINES += SC_DEFAULT_APIKEY=\"$${SC_DEFAULT_APIKEY}\"
message($$SC_DEFAULT_APIKEY)
}

# On Linux compilation, setup the profile search directory
Expand Down

0 comments on commit ab0f7da

Please sign in to comment.