Repository navigation
https://github.com/sqlite/sqlite/pull/10#issuecomment-1538376858 - #2
Conversation
|
Thanks. Huge patch, so please follow up if you might find something breaking bases on this. |
|
Fyi, my cmake cmd line used on windows: cmake -G "Ninja" ^
-DCMAKE_INSTALL_PREFIX=C:\sdk\release\vs17_x64-avx ^
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^
-DCMAKE_REQUIRED_INCLUDES=C:\sdk\release\vs17_x64-avx\include ^
-DENABLE_SHARED=ON ^
-DSHAREDLIB_PREFIX=lib ^
-DENABLE_STATIC=OFF ^
-DBUILD_SHELL=ON ^
-DENABLE_STATIC_SHELL=OFF ^
-DENABLE_EDITLINE=OFF ^
-DENABLE_READLINE=OFF ^
-DENABLE_THREADSAFE=ON ^
-DENABLE_DYNAMIC_EXTENSIONS=ON ^
-DENABLE_MATH=ON ^
-DENABLE_FTS4=ON ^
-DENABLE_FTS3=OFF ^
-DENABLE_FTS5=ON ^
-DENABLE_RTREE=ON ^
-DENABLE_SESSION=OFF ^
-DENABLE_DEBUG=OFF ^
-DRECOMMENDED_OPTIONS=ON ^
-DENABLE_COLUMN_METADATA=ON ^
-DENABLE_DBSTAT_VTAB=ON ^
-DENABLE_ICU=ON ^
-DICU_ROOT=C:\sdk\release\vs17_x64-avx ^
-DENABLE_RBU=ON ^
-DENABLE_STAT4=ON ^
-DOMIT_JSON=OFF ^
-DOMIT_DECLTYPE=OFF ^
-DOMIT_AUTOINIT=OFF ^
-DUSE_URI=OFF ^
-DWIN32_MALLOC=ON ^
-DWIN32_HEAP_CREATE=ON ^
-DBUILD_WITH_XPSDK=OFF ^
C:\sdk\src\sqlite |
|
Looks like the current script breaks a plain build on Linux. |
|
Hi @rhuijben
diff --git "a/CMakeLists.txt" "b/CMakeLists.txt"
index 400c17f..c2da259 100644
--- "a/CMakeLists.txt"
+++ "b/CMakeLists.txt"
@@ -488,7 +488,7 @@ if(ENABLE_SHARED)
add_library(sqlite3-shared SHARED ${SQLITE3_LIB_SRC})
target_compile_definitions(sqlite3-shared PRIVATE ${SQLITE_API_DECL})
target_link_libraries(sqlite3-shared ${SQLITE3_DEP_LIBRARIES})
- target_include_directories(sqlite3-shared PUBLIC ${CMAKE_REQUIRED_INCLUDES})
+ target_include_directories(sqlite3-shared PUBLIC ${CMAKE_INSTALL_PREFIX}/include)
set_target_properties(sqlite3-shared PROPERTIES
OUTPUT_NAME ${SHAREDLIB_PREFIX}${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
@@ -522,7 +522,7 @@ if(BUILD_SHELL)
if(ENABLE_STATIC_SHELL)
add_dependencies(sqlite3 sqlite3-static)
target_link_libraries(sqlite3 sqlite3-static ${SQLITE3_DEP_LIBRARIES})
- target_include_directories(sqlite3 sqlite3-static PUBLIC ${CMAKE_REQUIRED_INCLUDES})
+ target_include_directories(sqlite3 sqlite3-static PUBLIC ${CMAKE_INSTALL_PREFIX}/include)
else()
add_dependencies(sqlite3 sqlite3-shared)
target_link_libraries(sqlite3 sqlite3-shared)
@@ -530,7 +530,7 @@ if(BUILD_SHELL)
if(UNIX)
if(CMAKE_BUILD_TYPE STREQUAL Release)
- add_custom_command(TARGET shell_app POST_BUILD
+ add_custom_command(TARGET sqlite3 POST_BUILD
COMMAND ${CMAKE_STRIP} ${EXE_NAME}
)
endif() |
|
@nono303 applied most of the patch, but used a different approach for the final step. With that I get the build going, but the library name is still broken. I was guessing that was only in the trace output yesterday, but that name is really there |
👌
Yes and that need an quick explanation as for Windows build, symbols file (pdb) take the name of the target diff --git "a/CMakeLists.txt" "b/CMakeLists.txt"
index 405d654..c14620a 100644
--- "a/CMakeLists.txt"
+++ "b/CMakeLists.txt"
@@ -425,7 +425,7 @@ else()
endif()
message(STATUS "Build shared library: ${ENABLE_SHARED}")
-message(STATUS "Shared library name: ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME}")
+message(STATUS "Shared library name: ${SHAREDLIB_PREFIX}${PROJECT_NAME}")
message(STATUS "Build static library: ${ENABLE_STATIC}")
message(STATUS "Build shell tool: ${BUILD_SHELL}")
message(STATUS "Statically link shell tool: ${ENABLE_STATIC_SHELL}")
@@ -489,7 +489,7 @@ if(ENABLE_SHARED)
target_link_libraries(sqlite3-shared ${SQLITE3_DEP_LIBRARIES})
target_include_directories(sqlite3-shared PUBLIC ${CMAKE_INSTALL_PREFIX}/include)
set_target_properties(sqlite3-shared PROPERTIES
- OUTPUT_NAME ${PROJECT_NAME}
+ OUTPUT_NAME ${SHAREDLIB_PREFIX}${PROJECT_NAME}
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR})this should give equivalent trace on Linux (without pdb install and dll > so)
...
-- Shared library name: libsqlite3
...
-- Installing: C:/sdk/release/vs17_x64-avx/lib/libsqlite3.lib
-- Installing: C:/sdk/release/vs17_x64-avx/bin/libsqlite3.dll
-- Installing: C:/sdk/release/vs17_x64-avx/bin/libsqlite3.pdb
...
...
-- Shared library name: sqlite3
...
-- Installing: C:/sdk/release/vs17_x64-avx/lib/sqlite3.lib
-- Installing: C:/sdk/release/vs17_x64-avx/bin/sqlite3.dll
-- Installing: C:/sdk/release/vs17_x64-avx/bin/sqlite3.pdb
...I does a last "copy-paste fury" review and everything should work fine for everyone after this patch ;) |

Hi @rhuijben,
You may have seen the PR https://github.com/sqlite/sqlite/pull/10 and as it might take time for sqlite forum community to validate or alow it… I propose to merge @jingyu CMakeLists.txt on your repository to be tested and reviewed