forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -82,12 +82,14 @@ ENABLE_TESTING()
|
|||||||
add_executable(${PROJECT_NAME} %{MainCppName})
|
add_executable(${PROJECT_NAME} %{MainCppName})
|
||||||
add_test(${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
add_test(${PROJECT_NAME} COMMAND ${PROJECT_NAME})
|
||||||
|
|
||||||
if ($ENV{BOOST_INC_DIR})
|
if (DEFINED ENV{BOOST_INCLUDE_DIR})
|
||||||
set(BOOST_INC_DIR $ENV{BOOST_INC_DIR})
|
set(BOOST_INCLUDE_DIR $ENV{BOOST_INCLUDE_DIR})
|
||||||
else ()
|
else ()
|
||||||
set(BOOST_INC_DIR "%{BoostIncDir}") # set by Qt Creator wizard
|
set(BOOST_INCLUDE_DIR "%{BoostIncDir}") # set by Qt Creator wizard
|
||||||
endif ()
|
endif ()
|
||||||
if (EXISTS ${BOOST_INC_DIR})
|
if (BOOST_INCLUDE_DIR STREQUAL "")
|
||||||
include_directories(${BOOST_INC_DIR})
|
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 ()
|
||||||
@endif
|
@endif
|
||||||
|
Reference in New Issue
Block a user