use `find_packages` in cmake files to for shared lib build
@yulin-li The build script already supports building shared library for 1ds as here.
So, something like this should work:
$ export CMAKE_OPTS='-DBUILD_SHARED_LIBS=ON'
$ ./build-tests.sh release
@yulin-li The build script already supports building shared library for 1ds as here.
So, something like this should work:
$ export CMAKE_OPTS='-DBUILD_SHARED_LIBS=ON' $ ./build-tests.sh release
oh thanks, let me revert the changes in build-test.sh. I think it's still worth to keep the find_package updates.
oh thanks, let me revert the changes in
build-test.sh. I think it's still worth to keep thefind_packageupdates.
This would be a problem if we install sqlite3 from (say) apt package manager. As "sqlite3" or "sqlite3-dev" package installed through it doesn't seem to include a CMake package config file. Do you see issue without find_package, as the build will eventually fail anyway if sqlite3 is not installed ?
# dpkg-query -L libsqlite3-dev:amd64
/.
/usr
/usr/include
/usr/include/sqlite3.h
/usr/include/sqlite3ext.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libsqlite3.a
/usr/lib/x86_64-linux-gnu/libsqlite3.la
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/sqlite3.pc
/usr/share
/usr/share/doc
/usr/share/doc/libsqlite3-dev
/usr/share/doc/libsqlite3-dev/copyright
/usr/lib/x86_64-linux-gnu/libsqlite3.so
/usr/share/doc/libsqlite3-dev/changelog.Debian.gz
# dpkg-query -L libsqlite3-0:amd64
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
/usr/share
/usr/share/doc
/usr/share/doc/libsqlite3-0
/usr/share/doc/libsqlite3-0/README.Debian
/usr/share/doc/libsqlite3-0/changelog.Debian.gz
/usr/share/doc/libsqlite3-0/copyright
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
# dpkg-query -L sqlite3
/.
/usr
/usr/bin
/usr/bin/sqldiff
/usr/bin/sqlite3
/usr/share
/usr/share/doc
/usr/share/doc/sqlite3
/usr/share/doc/sqlite3/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/sqldiff.1.gz
/usr/share/man/man1/sqlite3.1.gz
/usr/share/doc/sqlite3/changelog.Debian.gz
@yulin-li - let us know if the PR is still valid ?
CMAKE_OPTS='-DBUILD_SHARED_LIBS=ON'
sorry for this very late reply. The camke configurations is actually provided by cmake (https://github.com/Kitware/CMake/blob/master/Modules/FindSQLite3.cmake), not sqlite3 package.
The problem without find_packages is, we cannot use sqlite3 installed by package managers, we need to install a duplicated one in /usr/local/lib/
**lalitb ** c
@lalitb this PR is still valid, which allows us to use sqlite3 libs installed by package managers.