Skip to content

Commit

Permalink
Don't require catkin_package to be called before catkin_generate_virt…
Browse files Browse the repository at this point in the history
…ualenv (#67)
  • Loading branch information
paulbovbel authored Jul 9, 2020
1 parent 3f5948b commit 1eb95b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ In CMakeLists.txt:
# Make sure to find-package `catkin_virtualenv`
find_package(catkin REQUIRED ... catkin_virtualenv ...)
# Must be called before catkin_generate_virtualenv
catkin_package()
# Generate the virtualenv
catkin_generate_virtualenv()
Expand Down
4 changes: 3 additions & 1 deletion catkin_virtualenv/cmake/catkin_generate_virtualenv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ function(catkin_generate_virtualenv)
return()
endif()

### Start building virtualenv
# Make sure CATKIN_* paths are initialized
catkin_destinations() # oh the places we'll go

### Start building virtualenv
set(venv_dir venv)

set(venv_devel_dir ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/${venv_dir})
Expand Down
5 changes: 3 additions & 2 deletions test_catkin_virtualenv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ project(test_catkin_virtualenv)

find_package(catkin REQUIRED COMPONENTS catkin_virtualenv)

catkin_package()

catkin_generate_virtualenv(
INPUT_REQUIREMENTS requirements.in
)

# Order with catkin_generate_virtualenv shouldn't matter
catkin_package()

install(FILES requirements.txt
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

Expand Down

0 comments on commit 1eb95b6

Please sign in to comment.