Skip to content

Commit a435e2e

Browse files
committed
BUILD WHEEL flag
1 parent 44b7ae5 commit a435e2e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ if (NOT TileDB_FOUND)
5252
endif()
5353
find_package(TileDB REQUIRED)
5454
set(TILEDB_DOWNLOADED TRUE)
55+
set(BUILD_WHEEL TRUE)
5556
else()
5657
message(STATUS "Found external TileDB core library")
5758
endif()

tiledb/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,23 @@ endif()
3939
install(TARGETS main DESTINATION tiledb)
4040

4141
if(TILEDB_DOWNLOADED)
42-
message(STATUS "Adding \"libtiledb\" into install group")
43-
44-
install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION tiledb)
42+
if(BUILD_WHEEL)
43+
message(STATUS "Wheel build: skipping install of libtiledb.so (auditwheel will vendor it)")
44+
else()
45+
message(STATUS "System install: installing libtiledb.so into package")
46+
install(IMPORTED_RUNTIME_ARTIFACTS TileDB::tiledb_shared DESTINATION tiledb)
47+
endif()
4548

4649
if (APPLE)
4750
set_target_properties(main PROPERTIES INSTALL_RPATH "@loader_path")
4851
elseif(UNIX)
4952
set_target_properties(main PROPERTIES INSTALL_RPATH "\$ORIGIN")
5053
endif()
54+
55+
get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION)
56+
get_filename_component(TILEDB_LOCATION ${TILEDB_LOCATION} DIRECTORY)
57+
message(STATUS "Setting RPATH for targets \"main\" and \"libtiledb\" to ${TILEDB_LOCATION}")
58+
set_target_properties(main PROPERTIES INSTALL_RPATH ${TILEDB_LOCATION})
5159
else()
5260
# If using external TileDB core library force it to be linked at runtime using RPATH
5361
get_property(TILEDB_LOCATION TARGET TileDB::tiledb_shared PROPERTY LOCATION)

0 commit comments

Comments
 (0)