2021-04-24 19:47:52 +00:00
|
|
|
set(H3_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib")
|
|
|
|
set(H3_BINARY_DIR "${ClickHouse_BINARY_DIR}/contrib/h3/src/h3lib")
|
2019-06-30 18:49:57 +00:00
|
|
|
|
|
|
|
set(SRCS
|
2021-04-24 19:48:44 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/algos.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/coordijk.c"
|
2021-06-22 07:39:27 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/bbox.c"
|
2021-04-24 19:48:44 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/polygon.c"
|
2021-06-22 07:39:27 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/h3Index.c"
|
2021-04-24 19:48:44 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/vec2d.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/vec3d.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/vertex.c"
|
2021-06-22 07:39:27 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/linkedGeo.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/localij.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/latLng.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/directedEdge.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/mathExtensions.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/iterators.c"
|
2021-04-24 19:48:44 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/vertexGraph.c"
|
2021-06-22 07:39:27 +00:00
|
|
|
"${H3_SOURCE_DIR}/lib/faceijk.c"
|
|
|
|
"${H3_SOURCE_DIR}/lib/baseCells.c"
|
2019-06-30 18:49:57 +00:00
|
|
|
)
|
|
|
|
|
2021-04-24 19:47:52 +00:00
|
|
|
configure_file("${H3_SOURCE_DIR}/include/h3api.h.in" "${H3_BINARY_DIR}/include/h3api.h")
|
2019-06-30 18:49:57 +00:00
|
|
|
|
|
|
|
add_library(h3 ${SRCS})
|
2021-04-24 19:47:52 +00:00
|
|
|
target_include_directories(h3 SYSTEM PUBLIC "${H3_SOURCE_DIR}/include")
|
|
|
|
target_include_directories(h3 SYSTEM PUBLIC "${H3_BINARY_DIR}/include")
|
2019-06-30 18:49:57 +00:00
|
|
|
target_compile_definitions(h3 PRIVATE H3_HAVE_VLA)
|
2019-08-04 00:19:03 +00:00
|
|
|
if(M_LIBRARY)
|
|
|
|
target_link_libraries(h3 PRIVATE ${M_LIBRARY})
|
|
|
|
endif()
|