-
Notifications
You must be signed in to change notification settings - Fork 33
/
CMakeLists.txt
60 lines (52 loc) · 1.66 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cmake_minimum_required(VERSION 3.15...3.26)
project(${SKBUILD_PROJECT_NAME})
set(PYBIND11_NEWPYTHON ON)
find_package(
Python
COMPONENTS Interpreter Development.Module NumPy
REQUIRED
)
find_package(pybind11 CONFIG REQUIRED)
if (TILEDB_PATH)
file(REAL_PATH "${TILEDB_PATH}" USER_TILEDB_PATH EXPAND_TILDE)
file(GLOB_RECURSE USER_TILEDB_CONFIG_PATH "${TILEDB_PATH}/**/TileDBConfig.cmake")
cmake_path(GET USER_TILEDB_CONFIG_PATH PARENT_PATH USER_TILEDB_DIR)
set(TileDB_DIR ${USER_TILEDB_DIR})
endif()
# In the future we should use vcpkg
if (TILEDB_PATH)
find_package(TileDB
HINTS ${USER_TILEDB_DIR} ${TILEDB_PATH}
QUIET NO_DEFAULT_PATH REQUIRED)
else()
find_package(TileDB QUIET)
endif()
if (NOT TileDB_FOUND)
include(cmake/DownloadTileDB.cmake)
if (TILEDB_VERSION)
message(STATUS "Downloading TileDB version \"${TILEDB_VERSION}\" ...")
if (TILEDB_HASH)
fetch_prebuilt_tiledb(
VERSION ${TILEDB_VERSION}
RELLIST_HASH SHA256=${TILEDB_HASH}
)
else()
fetch_prebuilt_tiledb(
VERSION ${TILEDB_VERSION}
)
endif()
else()
message(STATUS "Downloading TileDB default version ...")
# Download latest release
fetch_prebuilt_tiledb(
VERSION 2.26.2
RELLIST_HASH SHA256=86c19d7c5246cb18e370a4272cead63ea84bd651789842e618de4d57d4510522
)
endif()
find_package(TileDB REQUIRED)
set(TILEDB_DOWNLOADED TRUE)
else()
message(STATUS "Found external TileDB core library")
endif()
message(STATUS "Using libtiledb path: " "${TileDB_DIR}")
add_subdirectory(tiledb)