fix include symlink handling for pybind11 libraries
This commit is contained in:
parent
71416fcd25
commit
2dbda84ef1
1 changed files with 20 additions and 4 deletions
|
|
@ -305,6 +305,8 @@ endmacro()
|
|||
# use this for a subdir that builds a library
|
||||
# and supports find_package()
|
||||
#
|
||||
# note: used deliberately in xo_pybind11_library() below
|
||||
#
|
||||
macro(xo_install_library2 target)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
|
|
@ -347,6 +349,18 @@ macro(xo_install_library4 target projectTargets)
|
|||
#xo_install_include_tree() -- use xo_install_include_tree3() separately
|
||||
endmacro()
|
||||
|
||||
macro(xo_install_library4_noincludes target projectTargets)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
EXPORT ${projectTargets}
|
||||
LIBRARY DESTINATION lib COMPONENT Runtime
|
||||
ARCHIVE DESTINATION lib COMPONENT Development
|
||||
RUNTIME DESTINATION bin COMPONENT Runtime
|
||||
PUBLIC_HEADER DESTINATION include COMPONENT Development
|
||||
BUNDLE DESTINATION bin COMPONENT Runtime
|
||||
)
|
||||
endmacro()
|
||||
|
||||
macro(xo_install_library5 target nxo_target projectTargets)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
|
|
@ -524,9 +538,9 @@ macro(xo_pybind11_library target projectTargets source_files)
|
|||
|
||||
if(XO_SYMLINK_INSTALL)
|
||||
xo_install_make_symlink(
|
||||
${PROJECT_BINARY_DIR}/include/xo/${target}
|
||||
${CMAKE_INSTALL_PREFIX}/include/xo/${target}
|
||||
${target}.hpp)
|
||||
${PROJECT_BINARY_DIR}/include/xo
|
||||
${CMAKE_INSTALL_PREFIX}/include/xo
|
||||
${target})
|
||||
else()
|
||||
install(
|
||||
FILES ${PROJECT_BINARY_DIR}/include/xo/${target}/${target}.hpp
|
||||
|
|
@ -561,7 +575,9 @@ macro(xo_pybind11_library target projectTargets source_files)
|
|||
|
||||
xo_pybind11_link_flags()
|
||||
xo_include_options2(${target})
|
||||
xo_install_library4(${target} ${projectTargets})
|
||||
# don't want to symlink include tree, because lives in build dir.
|
||||
# see install for generated .hpp above
|
||||
xo_install_library4_noincludes(${target} ${projectTargets})
|
||||
endmacro()
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue