Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require catkin_package to be called before catkin_generate_virtualenv #67

Merged
merged 2 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()

### 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