-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install sqlite3.exe as part of sqlite3 port #2525
Install sqlite3.exe as part of sqlite3 port #2525
Conversation
- Modeled after the bzip2 port: If SQLITE3_SKIP_TOOLS is not set, build and install sqlite3.exe as part of the sqlite3 package. sqlite3.dll must also be copied to the tools folder for sqlite3.exe to be able to launch. - Tested on Windows RS3 with VS 2017 15.5.2.
ports/sqlite3/CMakeLists.txt
Outdated
@@ -22,10 +22,20 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") | |||
target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1) | |||
endif() | |||
|
|||
install(TARGETS sqlite3 EXPORT sqlite3Config | |||
|
|||
if(NOT SQLITE3_SKIP_TOOLS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The portfile should be updated to include OPTIONS_DEBUG SQLITE3_SKIP_TOOLS=ON
since we don't really need it to be built in debug mode :)
ports/sqlite3/CMakeLists.txt
Outdated
add_executable(sqlite3-bin ${SOURCE}/shell.c) | ||
set_target_properties(sqlite3-bin PROPERTIES OUTPUT_NAME sqlite3) | ||
target_link_libraries(sqlite3-bin PRIVATE sqlite3) | ||
install(TARGETS sqlite3-bin sqlite3 RUNTIME DESTINATION tools) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of installing to tools
, we should install to tools/sqlite3
.
ports/sqlite3/CMakeLists.txt
Outdated
@@ -22,10 +22,20 @@ if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") | |||
target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1) | |||
endif() | |||
|
|||
install(TARGETS sqlite3 EXPORT sqlite3Config | |||
|
|||
if(NOT SQLITE3_SKIP_TOOLS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be skipped when building for WindowsStore.
Thanks for the PR! This seems pretty solid, but there are a few minor changes that we should add to improve other cases. In addition to the comments I made:
|
The
Log:
|
The sqlite3.exe command line shell is very helpful when learning or using sqlite3. The shell source comes with the amalgamated source drop, so let's build and install it as part of the vcpkg port.
set, build and install sqlite3.exe as part of the sqlite3
package. sqlite3.dll must also be copied to the tools folder
for sqlite3.exe to be able to launch.