Skip to content

Commit

Permalink
Merge branch 'install_python_code' into 'master'
Browse files Browse the repository at this point in the history
Install the python code in the destination prefix

See merge request npneq/inq!1164
  • Loading branch information
xavierandrade committed Nov 17, 2024
2 parents 9e20c27 + fd3243f commit 7cb1200
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ pybind11_add_module(_pinq MODULE
target_link_libraries(_pinq PUBLIC)
target_link_libraries(_pinq PRIVATE inq)

#DO NOT INSTALL FROM HERE
#
#if (NOT CMAKE_INSTALL_PYTHON_LIBDIR)
# set(CMAKE_INSTALL_PYTHON_LIBDIR
# "${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
#endif ()
#install(TARGETS _pinq
# COMPONENT python
# LIBRARY DESTINATION "${CMAKE_INSTALL_PYTHON_LIBDIR}"
#)

if (NOT CMAKE_INSTALL_PYTHON_LIBDIR)
set(CMAKE_INSTALL_PYTHON_LIBDIR
"${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
endif ()

install(TARGETS _pinq
COMPONENT python
LIBRARY DESTINATION "${CMAKE_INSTALL_PYTHON_LIBDIR}"
)
install(DIRECTORY pinq DESTINATION ${CMAKE_INSTALL_PYTHON_LIBDIR})

0 comments on commit 7cb1200

Please sign in to comment.