Skip to content

Commit

Permalink
If cmake built a python module, teach cmake to install the python mod…
Browse files Browse the repository at this point in the history
…ule. (#6523)

(cherry picked from commit 3a4e4c7)
  • Loading branch information
Infinoid authored and alexreinking committed Jan 5, 2022
1 parent ae942b2 commit 89b89c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ foreach (dep IN ITEMS Halide_LLVM Halide_wabt)
endif ()
endforeach ()

##
# Python bindings
##

if (WITH_PYTHON_BINDINGS)
set(Halide_INSTALL_PYTHONDIR "${CMAKE_INSTALL_LIBDIR}/python3/site-packages"
CACHE STRING "Path to Halide Python bindings folder")
install(TARGETS Halide_Python
LIBRARY DESTINATION ${Halide_INSTALL_PYTHONDIR} COMPONENT Halide_Python
NAMELINK_COMPONENT Halide_Python)
endif ()

##
# Library-type-agnostic interface targets
##
Expand Down

0 comments on commit 89b89c9

Please sign in to comment.