diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-05-24 08:49:34 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-05-24 06:58:41 +0000 |
commit | 675ac662e97766f36125311cdc0787cc4ae0308e (patch) | |
tree | 46f36e4c3b90bd59db1ee11a58a5bea64b269f9c /share/qtcreator/templates | |
parent | 7418c4f1ee79024d5092dba70015549100bacb83 (diff) |
Wizard: Fix AutoTest wizard for Boost with CMake
While at it use the same environment variable used for
Qmake or Qbs based project.
Change-Id: Ieefb4e1da4ce4155863b80a1b275b67e664273c6
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'share/qtcreator/templates')
-rw-r--r-- | share/qtcreator/templates/wizards/autotest/files/tst.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/share/qtcreator/templates/wizards/autotest/files/tst.txt b/share/qtcreator/templates/wizards/autotest/files/tst.txt index 150fc1d632..2d3826d00b 100644 --- a/share/qtcreator/templates/wizards/autotest/files/tst.txt +++ b/share/qtcreator/templates/wizards/autotest/files/tst.txt @@ -82,12 +82,14 @@ ENABLE_TESTING() add_executable(${PROJECT_NAME} %{MainCppName}) add_test(${PROJECT_NAME} COMMAND ${PROJECT_NAME}) -if ($ENV{BOOST_INC_DIR}) - set(BOOST_INC_DIR $ENV{BOOST_INC_DIR}) +if (DEFINED ENV{BOOST_INCLUDE_DIR}) + set(BOOST_INCLUDE_DIR $ENV{BOOST_INCLUDE_DIR}) else () - set(BOOST_INC_DIR "%{BoostIncDir}") # set by Qt Creator wizard + set(BOOST_INCLUDE_DIR "%{BoostIncDir}") # set by Qt Creator wizard endif () -if (EXISTS ${BOOST_INC_DIR}) - include_directories(${BOOST_INC_DIR}) +if (BOOST_INCLUDE_DIR STREQUAL "") + message("BOOST_INCLUDE_DIR is not set, assuming Boost can be found automatically in your system") +elseif (EXISTS ${BOOST_INCLUDE_DIR}) + include_directories(${BOOST_INCLUDE_DIR}) endif () @endif |