Skip to content

Commit

Permalink
COMMON: add DESTDIR to python install path
Browse files Browse the repository at this point in the history
  • Loading branch information
apeters1971 authored and esindril committed Nov 26, 2024
1 parent 5f1976b commit ec91574
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ add_custom_target(build_python_module
# Define a custom target to install the Python module
add_custom_target(install_python_module
COMMAND ${CMAKE_COMMAND} -E echo "Installing Python module..."
COMMAND ${Python3_EXECUTABLE} setup.py install --prefix=${PYTHONSITEPKG_PATH}
COMMAND ${Python3_EXECUTABLE} setup.py install --prefix=${DESTDIR}/${PYTHONSITEPKG_PATH}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/common/token/
)

Expand All @@ -347,7 +347,6 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E echo "Installing Python module after install..."
)

# Add the build_python_module as a dependency of the 'install' target
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} --build . --target build_python_module)")
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} --build . --target install_python_module)")

Expand Down

0 comments on commit ec91574

Please sign in to comment.