Skip to content

Commit

Permalink
Fixing auditwheel issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dudoslav committed Oct 22, 2024
1 parent ee71ca3 commit 9af5a7e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 44 deletions.
12 changes: 2 additions & 10 deletions apis/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,14 @@ target_link_libraries(${VCF_TARGET_NAME} PRIVATE tiledbvcf)
if (APPLE)
set_target_properties(${VCF_TARGET_NAME} PROPERTIES INSTALL_RPATH "@loader_path/lib")
else()
set_target_properties(${VCF_TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN/")
set_target_properties(tiledbvcf PROPERTIES INSTALL_RPATH "$ORIGIN/")
set_target_properties(${VCF_TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN/lib")
endif()

install(
IMPORTED_RUNTIME_ARTIFACTS
TileDB::tiledb_shared
RUNTIME DESTINATION tiledbvcf
LIBRARY DESTINATION tiledbvcf
)

# Install the extension module
install(
TARGETS ${VCF_TARGET_NAME}
RUNTIME DESTINATION tiledbvcf
LIBRARY DESTINATION tiledbvcf
LIBRARY DESTINATION tiledbvcf # MODULE
ARCHIVE DESTINATION tiledbvcf
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tiledbvcf
Expand Down
2 changes: 2 additions & 0 deletions libtiledbvcf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ find_package(TileDB REQUIRED)
find_package(CLI11 REQUIRED)
find_package(spdlog REQUIRED)

# TODO: Add simple find_package for Conda builds

if (WIN32)
FetchContent_Declare(
htslib
Expand Down
68 changes: 34 additions & 34 deletions libtiledbvcf/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,56 +250,56 @@ else()
set_target_properties(tiledbvcf PROPERTIES INSTALL_RPATH "$ORIGIN/")
endif()

set_property(
TARGET tiledbvcf-bin
PROPERTY INSTALL_RPATH
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
"${CMAKE_INSTALL_PREFIX}/lib"
)
#set_property(
# TARGET tiledbvcf-bin
# PROPERTY INSTALL_RPATH
# "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
# "${CMAKE_INSTALL_PREFIX}/lib"
#)

#if(WIN32)
# # Having the .dll and the .exe with the same name was resulting in a .exp
# # file for the .exe being 'last out' (replacing one of same name for the .dll)
# # and was causing the python api extension
# # to link to the .exe, which was not functional.
# # So, tiledbvcf-bin now sets an output (above somewhere) of tiledbvcfcli.exe
# # and we install it here RENAMEing it to match the known name in pre-existing
# # *nix world.
# install(PROGRAMS $<TARGET_FILE:tiledbvcf-bin>
# RENAME tiledbvcf.exe
# DESTINATION tiledbvcf
# )
#else()
# install(
# TARGETS tiledbvcf-bin
# RUNTIME DESTINATION tiledbvcf
# )
#endif()

if(WIN32)
# Having the .dll and the .exe with the same name was resulting in a .exp
# file for the .exe being 'last out' (replacing one of same name for the .dll)
# and was causing the python api extension
# to link to the .exe, which was not functional.
# So, tiledbvcf-bin now sets an output (above somewhere) of tiledbvcfcli.exe
# and we install it here RENAMEing it to match the known name in pre-existing
# *nix world.
install(PROGRAMS $<TARGET_FILE:tiledbvcf-bin>
RENAME tiledbvcf.exe
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
else()
if(TILEDBVCF_INSTALL_TILEDB)
install(
TARGETS tiledbvcf-bin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
IMPORTED_RUNTIME_ARTIFACTS
TileDB::tiledb_shared
RUNTIME DESTINATION tiledbvcf
LIBRARY DESTINATION tiledbvcf/lib
)
endif()

#if(TILEDBVCF_INSTALL_TILEDB)
# install(
# IMPORTED_RUNTIME_ARTIFACTS
# TileDB::tiledb_shared
# RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
# )
#endif()

install(
TARGETS tiledbvcf
RUNTIME DESTINATION tiledbvcf
LIBRARY DESTINATION tiledbvcf
ARCHIVE DESTINATION tiledbvcf
LIBRARY DESTINATION tiledbvcf/lib
ARCHIVE DESTINATION tiledbvcf/lib
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tiledbvcf
)

if (TILEDBVCF_ENABLE_PYTHON)
if (APPLE)
set_target_properties(tiledbvcf-bin PROPERTIES INSTALL_RPATH "@loader_path/../lib")
# set_target_properties(tiledbvcf-bin PROPERTIES INSTALL_RPATH "@loader_path/..")
set_target_properties(tiledbvcf PROPERTIES INSTALL_RPATH "@loader_path")
else()
set_target_properties(tiledbvcf-bin PROPERTIES INSTALL_RPATH "\$ORIGIN/../lib")
# set_target_properties(tiledbvcf-bin PROPERTIES INSTALL_RPATH "\$ORIGIN/..")
set_target_properties(tiledbvcf PROPERTIES INSTALL_RPATH "\$ORIGIN")
endif()
endif()

0 comments on commit 9af5a7e

Please sign in to comment.