Skip to content

Commit

Permalink
Avoid hunter disabling ENV${CMAKE_PREFIX_PATH}
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayeul d'Avezac committed Feb 8, 2017
1 parent bb73d6d commit f97c1e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/AddHunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ macro(initialize_hunter)
list(APPEND HUNTER_RECIPE_DIRS "${HUNTER_REPOSITORY_cookoff_DIRECTORY}")
list(APPEND CMAKE_MODULE_PATH "${HUNTER_REPOSITORY_cookoff_DIRECTORY}/find")
endif()
# Add env cmake prefix path explictly since hunter will set internal version,
# at which point cmake would ignore env one
if(NOT CMAKE_PREFIX_PATH AND NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
string(REGEX REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
endif()
endmacro()

macro(find_or_add_hunter_package package)
Expand Down

0 comments on commit f97c1e1

Please sign in to comment.