Skip to content

Commit

Permalink
Added cloning and checkout of repo for ros buildserver.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbjelonic committed Feb 1, 2018
1 parent 673ea2e commit 3a78f1f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions darknet_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ if(NOT DARKNET_PATH)
find_path(DARKNET_PATH
NAMES "README.md"
HINTS "${CMAKE_CURRENT_SOURCE_DIR}/../darknet/")

# Hack for ros build server (TODO: Find a better way).
if(NOT DARKNET_PATH)
message(STATUS "Update submodule did not work. Cloning and checkout of darknet ...")
execute_process(COMMAND git clone [email protected]:pjreddie/darknet.git
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../)
execute_process(COMMAND git checkout 59ed1719d4aa77a462eb41dd4db2dd3a2f8e4a1b
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../darknet/)
find_path(DARKNET_PATH
NAMES "README.md"
HINTS "${CMAKE_CURRENT_SOURCE_DIR}/../darknet/")
endif()
endif()
message("Darknet path dir = ${DARKNET_PATH}")
add_definitions(-DDARKNET_FILE_PATH="${DARKNET_PATH}")
Expand Down

0 comments on commit 3a78f1f

Please sign in to comment.