Skip to content
Snippets Groups Projects
Commit c540293f authored by Manuel Günther's avatar Manuel Günther
Browse files

Added possibility to parse bob packages with versions

parent 4a58beab
Branches
Tags
No related merge requests found
...@@ -68,6 +68,15 @@ macro(_recurse_requirements requirements) ...@@ -68,6 +68,15 @@ macro(_recurse_requirements requirements)
# check if string starts with bob # check if string starts with bob
string(FIND ${_req} bob _pos) string(FIND ${_req} bob _pos)
if (NOT ${_pos} EQUAL -1) 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 recursively (will not run if pacakge was already found)
find_bob_package(${_req}) find_bob_package(${_req})
endif() endif()
...@@ -199,7 +208,9 @@ if (NOT Bob_FIND_COMPONENTS) ...@@ -199,7 +208,9 @@ if (NOT Bob_FIND_COMPONENTS)
endif() endif()
# set Bob source directory, if not given yet (i.e., no FORCE option here) # 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 # set BOB_PREFIX_PATH as CMake variable when given in as environment variable
if (NOT "$ENV{BOB_PREFIX_PATH}" STREQUAL "") if (NOT "$ENV{BOB_PREFIX_PATH}" STREQUAL "")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment