@@ -17,7 +17,9 @@ add_definitions(-DDUCKDB_PATCH_VERSION=${DUCKDB_PATCH_VERSION})
17
17
# Enable network functionality (OpenSSL and GDAL's CURL based fs/drivers)
18
18
option (SPATIAL_USE_NETWORK "Enable network functionality" ON )
19
19
20
- if (EMSCRIPTEN OR IOS OR ANDROID)
20
+ if (EMSCRIPTEN
21
+ OR IOS
22
+ OR ANDROID)
21
23
set (SPATIAL_USE_NETWORK OFF )
22
24
endif ()
23
25
@@ -32,7 +34,6 @@ include_directories(spatial/third_party/protozero/include)
32
34
include_directories (spatial/third_party/shapelib)
33
35
add_subdirectory (spatial/third_party/shapelib)
34
36
35
-
36
37
add_library (${EXTENSION_NAME} STATIC ${EXTENSION_SOURCES} )
37
38
38
39
# Build dependencies TODO: in the future we should allow users to dynamically
@@ -44,19 +45,17 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/deps)
44
45
execute_process (
45
46
# Generate project
46
47
COMMAND
47
- ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR}
48
- -DDUCKDB_ENABLE_DEPRECATED_API=1
49
- -DWASM_LOADABLE_EXTENSIONS=1
50
- -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
48
+ ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} -DDUCKDB_ENABLE_DEPRECATED_API=1
49
+ -DWASM_LOADABLE_EXTENSIONS=1 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
51
50
-DOSX_BUILD_ARCH=${OSX_BUILD_ARCH}
52
51
-DSPATIAL_USE_NETWORK=${SPATIAL_USE_NETWORK}
53
52
-DOPENSSL_ROOT_DIR=$ENV{OPENSSL_ROOT_DIR}
54
53
-DVCPKG_MANIFEST_DIR='${VCPKG_MANIFEST_DIR} '
55
54
-DVCPKG_INSTALLED_DIR='${CMAKE_BINARY_DIR} /vcpkg_installed'
56
55
-DCMAKE_TOOLCHAIN_FILE='${CMAKE_TOOLCHAIN_FILE} '
57
56
-DVCPKG_TARGET_TRIPLET='${VCPKG_TARGET_TRIPLET} '
58
- -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE='${VCPKG_CHAINLOAD_TOOLCHAIN_FILE} '
59
- -S ${CMAKE_CURRENT_SOURCE_DIR} /deps -B ${CMAKE_BINARY_DIR} /deps
57
+ -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE='${VCPKG_CHAINLOAD_TOOLCHAIN_FILE} ' -S
58
+ ${CMAKE_CURRENT_SOURCE_DIR} /deps -B ${CMAKE_BINARY_DIR} /deps
60
59
RESULT_VARIABLE DEPENDENCIES_GENERATE_RESULT)
61
60
if (NOT DEPENDENCIES_GENERATE_RESULT EQUAL 0)
62
61
message (FATAL_ERROR "Could not generate dependencies project" )
@@ -83,7 +82,7 @@ message(STATUS "Find libraries path: '${CMAKE_PREFIX_PATH}'")
83
82
set (ZLIB_USE_STATIC_LIBS ON )
84
83
set (OPENSSL_USE_STATIC_LIBS ON )
85
84
86
- if (EMSCRIPTEN)
85
+ if (EMSCRIPTEN)
87
86
set (OPENSSL_USE_STATIC_LIBS OFF )
88
87
endif ()
89
88
@@ -97,16 +96,15 @@ find_package(EXPAT REQUIRED)
97
96
find_package (GeographicLib REQUIRED)
98
97
99
98
# Important: The link order matters, its the reverse order of dependency
100
- set (EXTENSION_DEPENDENCIES
101
- GDAL::GDAL
102
- GEOS::geos_c
103
- PROJ::proj
104
- EXPAT::EXPAT
105
- SQLite::SQLite3
106
- ZLIB::ZLIB
107
- ${SQLITE3_MEMVFS}
108
- ${GeographicLib_LIBRARIES}
109
- )
99
+ set (EXTENSION_DEPENDENCIES
100
+ GDAL::GDAL
101
+ GEOS::geos_c
102
+ PROJ::proj
103
+ EXPAT::EXPAT
104
+ SQLite::SQLite3
105
+ ZLIB::ZLIB
106
+ ${SQLITE3_MEMVFS}
107
+ ${GeographicLib_LIBRARIES} )
110
108
111
109
if (SPATIAL_USE_NETWORK)
112
110
message (STATUS "Building with network functionality" )
@@ -125,7 +123,7 @@ if((NOT EMSCRIPTEN) AND (NOT IOS))
125
123
find_library (CoreFoundation_Library CoreFoundation)
126
124
find_library (SystemConfiguration_Library SystemConfiguration)
127
125
list (APPEND EXTENSION_DEPENDENCIES ${CoreFoundation_Library}
128
- ${SystemConfiguration_Library} )
126
+ ${SystemConfiguration_Library} )
129
127
endif ()
130
128
endif ()
131
129
@@ -139,7 +137,8 @@ target_link_libraries(${EXTENSION_NAME} PUBLIC ${EXTENSION_DEPENDENCIES})
139
137
set (PARAMETERS "-warnings" )
140
138
build_loadable_extension(${TARGET_NAME} ${PARAMETERS} ${EXTENSION_SOURCES} )
141
139
142
- target_link_libraries (${TARGET_NAME} _loadable_extension ${EXTENSION_DEPENDENCIES} )
140
+ target_link_libraries (${TARGET_NAME} _loadable_extension
141
+ ${EXTENSION_DEPENDENCIES} )
143
142
144
143
install (
145
144
TARGETS ${EXTENSION_NAME}
0 commit comments