Commit c540293f authored by Manuel Günther's avatar Manuel Günther
Browse files

Added possibility to parse bob packages with versions

parent 4a58beab
......@@ -68,6 +68,15 @@ macro(_recurse_requirements requirements)
# check if string starts with bob
string(FIND ${_req} bob _pos)
if (NOT ${_pos} EQUAL -1)
# check if any versioning is added
set(_chars "=;<;>; ")
foreach (_char IN LISTS _chars)
string(FIND ${_req} ${_char} _pos)
if (NOT ${_pos} EQUAL -1)
string(REPLACE "${_char}" ";" _temp ${_req})
list(GET _temp 0 _req)
endif()
endforeach()
# find bob package recursively (will not run if pacakge was already found)
find_bob_package(${_req})
endif()
......@@ -199,7 +208,9 @@ if (NOT Bob_FIND_COMPONENTS)
endif()
# set Bob source directory, if not given yet (i.e., no FORCE option here)
set(BOB_SOURCE_DIR ${CMAKE_SOURCE_DIR} CACHE STRING "Source directory of Bob packages")
if (NOT BOB_SOURCE_DIR)
set(BOB_SOURCE_DIR ${CMAKE_SOURCE_DIR} CACHE STRING "Source directory of Bob packages")
endif()
# set BOB_PREFIX_PATH as CMake variable when given in as environment variable
if (NOT "$ENV{BOB_PREFIX_PATH}" STREQUAL "")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment