Skip to content

Commit

Permalink
Merge pull request #494 from Maxxen/rework
Browse files Browse the repository at this point in the history
Internal Rework
  • Loading branch information
Maxxen authored Feb 11, 2025
2 parents aa95ed8 + 8622162 commit ba425b7
Show file tree
Hide file tree
Showing 298 changed files with 20,742 additions and 22,017 deletions.
25 changes: 10 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ if(EMSCRIPTEN
set(SPATIAL_USE_NETWORK OFF)
endif()

include_directories(spatial/include)
add_subdirectory(spatial/src)
add_subdirectory(src/spatial)
add_subdirectory(src/sgl)
include_directories(src)

include_directories(spatial/third_party/yyjson/include)
add_subdirectory(spatial/third_party/yyjson)
include_directories(src/third_party/yyjson/include)
add_subdirectory(src/third_party/yyjson)

include_directories(spatial/third_party/protozero/include)
include_directories(src/third_party/protozero/include)

include_directories(spatial/third_party/shapelib)
add_subdirectory(spatial/third_party/shapelib)
include_directories(src/third_party/shapelib)
add_subdirectory(src/third_party/shapelib)

add_library(${EXTENSION_NAME} STATIC ${EXTENSION_SOURCES})

Expand All @@ -47,8 +48,7 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/deps)
COMMAND
${CMAKE_COMMAND} -G ${CMAKE_GENERATOR}
-DCMAKE_CXX_COMPILER='${CMAKE_CXX_COMPILER}'
-DCMAKE_C_COMPILER='${CMAKE_C_COMPILER}'
-DDUCKDB_ENABLE_DEPRECATED_API=1
-DCMAKE_C_COMPILER='${CMAKE_C_COMPILER}' -DDUCKDB_ENABLE_DEPRECATED_API=1
-DWASM_LOADABLE_EXTENSIONS=1 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DOSX_BUILD_ARCH=${OSX_BUILD_ARCH}
-DSPATIAL_USE_NETWORK=${SPATIAL_USE_NETWORK}
Expand Down Expand Up @@ -96,7 +96,6 @@ find_package(SQLite3 REQUIRED)
find_package(GEOS REQUIRED)
find_package(GDAL REQUIRED)
find_package(EXPAT REQUIRED)
find_package(GeographicLib REQUIRED)

# Important: The link order matters, its the reverse order of dependency
set(EXTENSION_DEPENDENCIES
Expand All @@ -106,8 +105,7 @@ set(EXTENSION_DEPENDENCIES
EXPAT::EXPAT
SQLite::SQLite3
ZLIB::ZLIB
${SQLITE3_MEMVFS}
${GeographicLib_LIBRARIES})
${SQLITE3_MEMVFS})

if(SPATIAL_USE_NETWORK)
message(STATUS "Building with network functionality")
Expand All @@ -130,9 +128,6 @@ if((NOT EMSCRIPTEN) AND (NOT IOS))
endif()
endif()

# Geographiclib is special
include_directories(${GeographicLib_INCLUDE_DIRS})

# Add dependencies to extension
target_link_libraries(${EXTENSION_NAME} PUBLIC ${EXTENSION_DEPENDENCIES})

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
EXT_NAME=excel
EXT_CONFIG=${PROJ_DIR}extension_config.cmake

CORE_EXTENSIONS='httpfs'

# Include the Makefile from extension-ci-tools
include extension-ci-tools/makefiles/duckdb_extension.Makefile

#### Override the included format target because we have different source tree layout
format:
find spatial/src -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i
find spatial/include -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i
find src/spatial -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i
cmake-format -i CMakeLists.txt
2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 290 files
2 changes: 1 addition & 1 deletion extension_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

duckdb_extension_load(spatial
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}
INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/spatial/include
INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/src/spatial
${DO_TESTS}
LINKED_LIBS "../../deps/local/lib/*.a"
)
1 change: 0 additions & 1 deletion spatial/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions spatial/include/spatial/common.hpp

This file was deleted.

20 changes: 0 additions & 20 deletions spatial/include/spatial/core/functions/aggregate.hpp

This file was deleted.

37 changes: 0 additions & 37 deletions spatial/include/spatial/core/functions/cast.hpp

This file was deleted.

23 changes: 0 additions & 23 deletions spatial/include/spatial/core/functions/common.hpp

This file was deleted.

16 changes: 0 additions & 16 deletions spatial/include/spatial/core/functions/macros.hpp

This file was deleted.

Loading

0 comments on commit ba425b7

Please sign in to comment.