-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
140 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 7dc2bb7..89c0adc 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -896,12 +896,12 @@ function(build_loadable_extension_directory NAME ABI_TYPE OUTPUT_DIRECTORY EXTEN | ||
set(FOOTER_VERSION_VALUE ${CAPI_VERSION}) | ||
endif() | ||
|
||
- add_custom_command( | ||
- TARGET ${TARGET_NAME} | ||
- POST_BUILD | ||
- COMMAND | ||
- ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$<TARGET_FILE:${TARGET_NAME}>${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake | ||
- ) | ||
+ # add_custom_command( | ||
+ # TARGET ${TARGET_NAME} | ||
+ # POST_BUILD | ||
+ # COMMAND | ||
+ # ${CMAKE_COMMAND} -DABI_TYPE=${ABI_TYPE} -DEXTENSION=$<TARGET_FILE:${TARGET_NAME}>${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DVERSION_FIELD="${FOOTER_VERSION_VALUE}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake | ||
+ # ) | ||
add_dependencies(${TARGET_NAME} duckdb_platform) | ||
if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TIDY) | ||
add_dependencies(duckdb_local_extension_repo ${TARGET_NAME}) | ||
@@ -931,7 +931,7 @@ function(build_static_extension NAME PARAMETERS) | ||
set(FILES "${ARGV}") | ||
list(REMOVE_AT FILES 0) | ||
add_library(${NAME}_extension STATIC ${FILES}) | ||
- target_link_libraries(${NAME}_extension duckdb_static) | ||
+ # target_link_libraries(${NAME}_extension duckdb_static) | ||
endfunction() | ||
|
||
# Internal extension register function | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 3e757a4..957f0e4 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -109,7 +109,7 @@ else() | ||
duckdb_skiplistlib | ||
duckdb_mbedtls | ||
duckdb_yyjson) | ||
- | ||
+ if(BUILD_SHARED_LIBS) | ||
add_library(duckdb SHARED ${ALL_OBJECT_FILES}) | ||
|
||
if(WIN32 AND NOT MINGW) | ||
@@ -135,16 +135,16 @@ else() | ||
target_link_libraries(duckdb ${DUCKDB_LINK_LIBS}) | ||
link_threads(duckdb) | ||
link_extension_libraries(duckdb) | ||
- | ||
+ endif() | ||
add_library(duckdb_static STATIC ${ALL_OBJECT_FILES}) | ||
target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS}) | ||
link_threads(duckdb_static) | ||
link_extension_libraries(duckdb_static) | ||
- | ||
+ if(BUILD_SHARED_LIBS) | ||
target_include_directories( | ||
duckdb PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) | ||
- | ||
+ endif() | ||
target_include_directories( | ||
duckdb_static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) | ||
@@ -160,10 +160,18 @@ else() | ||
DESTINATION "${INSTALL_INCLUDE_DIR}") | ||
|
||
endif() | ||
- | ||
+if(BUILD_SHARED_LIBS) | ||
install( | ||
- TARGETS duckdb duckdb_static | ||
+ TARGETS duckdb | ||
EXPORT "${DUCKDB_EXPORT_SET}" | ||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" | ||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" | ||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}") | ||
+else() | ||
+install( | ||
+ TARGETS duckdb_static | ||
+ EXPORT "${DUCKDB_EXPORT_SET}" | ||
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" | ||
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" | ||
+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}") | ||
+endif() | ||
diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt | ||
index e29c33e..9e387f9 100644 | ||
--- a/tools/sqlite3_api_wrapper/CMakeLists.txt | ||
+++ b/tools/sqlite3_api_wrapper/CMakeLists.txt | ||
@@ -26,12 +26,12 @@ if(NOT AMALGAMATION_BUILD) | ||
endif() | ||
link_threads(sqlite3_api_wrapper_static) | ||
|
||
-if(NOT WIN32 AND NOT ZOS) | ||
+if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS) | ||
add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES}) | ||
target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS}) | ||
link_threads(sqlite3_api_wrapper) | ||
endif() | ||
- | ||
+if(0) | ||
include_directories(../../third_party/catch) | ||
|
||
include_directories(test/include) | ||
@@ -43,3 +43,4 @@ if(WIN32 OR ZOS) | ||
else() | ||
target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper) | ||
endif() | ||
+endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 89c0adc..af5b786 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -574,7 +574,7 @@ if(NOT MSVC) | ||
endif() | ||
else() | ||
set(CMAKE_CXX_WINDOWS_FLAGS | ||
- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8") | ||
+ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj") | ||
if(TREAT_WARNINGS_AS_ERRORS) | ||
set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
versions: | ||
"1.1.0": | ||
folder: "all" | ||
"1.0.0": | ||
folder: "all" | ||
"0.10.2": | ||
|