Mercurial > trustbridge
changeset 1093:153af47456d0
Add option "USE_REAL_RESOURCES" to avoid the if 1 dance for test/release builds.
If the option is not set the download resource is trustbridge-development.*
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 15 Sep 2014 10:17:17 +0200 |
parents | 02fd9992ccc9 |
children | 03a1f3761f45 |
files | CMakeLists.txt ui/mainwindow.cpp |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CMakeLists.txt Fri Sep 12 16:11:08 2014 +0200 +++ b/CMakeLists.txt Mon Sep 15 10:17:17 2014 +0200 @@ -9,6 +9,7 @@ project(trustbridge) option(DO_RELEASE_BUILD "Build for a public release." OFF) +option(USE_REAL_RESOURCES "Use real resource names on the download server. Autmatically ON if DO_RELEASE_BUILD is set" OFF ) option(ENABLE_PROFILING "Set to enable profiling." OFF) option(USE_CURL "Use libcurl to download updates and certificate lists." ON) @@ -65,6 +66,7 @@ set (CMAKE_BUILD_TYPE RELEASE) endif (NOT CMAKE_BUILD_TYPE) add_definitions (-DRELEASE_BUILD) + set(USE_REAL_RESOURCES ON) else() # Default to debug build if (NOT CMAKE_BUILD_TYPE) @@ -74,6 +76,10 @@ endif (NOT CMAKE_BUILD_TYPE) endif() +if(USE_REAL_RESOURCES) + add_definitions (-DUSE_REAL_RESOURCES) +endif() + # Warn level to be used for privileged parts set(WARN_HARDENING_FLAGS " -Wextra -Wconversion -Wformat-security")
--- a/ui/mainwindow.cpp Fri Sep 12 16:11:08 2014 +0200 +++ b/ui/mainwindow.cpp Mon Sep 15 10:17:17 2014 +0200 @@ -65,7 +65,7 @@ #define TB_ARCH_STRING "-amd64" #endif -#if 1 +#ifdef USE_REAL_RESOURCES # define LIST_RESOURCE "/zertifikatsliste.txt" # ifdef Q_OS_WIN # define SW_RESOURCE_VERSION "/TrustBridge-%1.exe"