Skip to content

Commit

Permalink
python/CMakeLists.txt: Fix install destination
Browse files Browse the repository at this point in the history
Added CMAKE_INSTALL_SITELIBDIR cached variable.
Default value is set to Python3_SITELIB (absolute path),
but can be changed at configuration time.
  • Loading branch information
podsvirov committed Apr 18, 2021
1 parent 0c4c460 commit 2fe6579
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ add_test(NAME pywraps2_test COMMAND
set_property(TEST pywraps2_test PROPERTY ENVIRONMENT
"PYTHONPATH=$ENV{PYTHONPATH}:${PROJECT_BINARY_DIR}/python")

set(CMAKE_INSTALL_SITELIBDIR "${Python3_SITELIB}"
CACHE STRING "Python site-packages installation directory")

# Install the wrapper.
install(TARGETS _pywraps2 DESTINATION ${Python3_SITELIB})
install(TARGETS _pywraps2 DESTINATION "${CMAKE_INSTALL_SITELIBDIR}")
install(FILES "${PROJECT_BINARY_DIR}/python/pywraps2.py"
DESTINATION ${Python3_SITELIB})
DESTINATION "${CMAKE_INSTALL_SITELIBDIR}")

0 comments on commit 2fe6579

Please sign in to comment.