Skip to content

Commit 2fe6579

Browse files
committed
python/CMakeLists.txt: Fix install destination
Added CMAKE_INSTALL_SITELIBDIR cached variable. Default value is set to Python3_SITELIB (absolute path), but can be changed at configuration time.
1 parent 0c4c460 commit 2fe6579

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/python/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ add_test(NAME pywraps2_test COMMAND
1515
set_property(TEST pywraps2_test PROPERTY ENVIRONMENT
1616
"PYTHONPATH=$ENV{PYTHONPATH}:${PROJECT_BINARY_DIR}/python")
1717

18+
set(CMAKE_INSTALL_SITELIBDIR "${Python3_SITELIB}"
19+
CACHE STRING "Python site-packages installation directory")
20+
1821
# Install the wrapper.
19-
install(TARGETS _pywraps2 DESTINATION ${Python3_SITELIB})
22+
install(TARGETS _pywraps2 DESTINATION "${CMAKE_INSTALL_SITELIBDIR}")
2023
install(FILES "${PROJECT_BINARY_DIR}/python/pywraps2.py"
21-
DESTINATION ${Python3_SITELIB})
24+
DESTINATION "${CMAKE_INSTALL_SITELIBDIR}")

0 commit comments

Comments
 (0)