-
Notifications
You must be signed in to change notification settings - Fork 510
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
Added support for external sqlite3 #234
Added support for external sqlite3 #234
Conversation
Hello @emmenlau Thank you for all your pull requests! In the meantime, I believe that I have merged another pull request similar to this one. Cheers! |
Hello @emmenlau, looking back at this one, I see that there are still very valuable bits here! Would you have the time to rebase it onto the new master branch? Cheers! |
07a0c0a
to
09ef77b
Compare
Dear @SRombauts , I've just reviewed the upstream changes and I think that some relevant parts have not been answered by the previous MR. I've therefore updated my PR accordingly. This PR changes/improves multiple things:
|
But one question: Would it not be better if the internal |
Oh yes, for sure, the thing is I never use this kind of "install" workflow |
Ok I'll give it a shot! |
09ef77b
to
8554155
Compare
Ok I've implemented installation instructions for the internal sqlite3. To add a cmake export for the internal sqlite, I've followed the guidelines given in https://stackoverflow.com/questions/36103012/cmake-dependency-management-in-a-multi-library-package-export. I've tested the solution with and without internal sqlite3 and it works for me. However I must admit that the size of the change is big enough that I can not 100% guarantee it covers all cases. I'm curious about the result from your CI testing. |
Please ignore this comment, it is deprecated with the latest version. |
e0bda1f
to
608ef2d
Compare
Dear @SRombauts , I've continued to improve the cmake instructions in this PR. In order to support internal or external
and instead used specific includes with Is this ok with you? |
a9cfc40
to
980e313
Compare
Hello, fun fact, I have already removed the line "include_directories("${PROJECT_SOURCE_DIR}/include")" yesterday evening on master ;) |
…thread and dl libs on Unix/Linux/Mac
980e313
to
a166062
Compare
Haha ok! I think all builds should now show green lights. If nothing else comes up, can this be merged? |
Yes, it looks good too me... even though we don't actually test the installation itself, nor the use of it by a test project. Adding an installation step and checking the result should be fairly easy I guess. |
For what its worth, I've checked the installation in our CI on the three major platforms Win, Lin and Mac, and could use the installed sqlite3 in downstream projects. And this PR also makes SQLiteCpp usable with a completely external sqlite3 for me, which previously caused some issues... |
Very good, thank you for your contribution! I'll see if I can automate some tests to avoid any regressions around these kind of sensitive features. Cheers! |
Great, thanks! |
This PR adds support for an externally compiled SQLite3. There are two main changes:
Threads::Threads
and DL-libs.The second change is a simplification and cleanup. SQLite3 always requires threads and DL-libraries. Therefore it seems not sensible to specify them individually for each target.
This PR also uses cmake standard functionality to detect the actual threads-implementation and DL-libraries for the current platform. This should improve portability to other (less common) platforms that may not use the name
pthreads
but another threading library name.