On Mon, 1 Oct 2018 at 21:45, Mateusz Loskot <mate...@loskot.net> wrote:
>
> The library has number of dependencies on third-party libraries,
> namely database access client libraries. I've reached the point
> where I need to 'list' those dependencies in soci-config.cmake [3]
> Namely, I need to make friend with find_dependency.
>
> In SOCI, I maintain number of Find-modules, eg. FindSQLite3.cmake,
> FindOracle.cmake, etc. Those are also an ancient CMake scripts,
> but I think my problem/question is orthogonal to rewriting those to
> target-aware modules or keep those old-style w/ FOO_LIBRARIES, etc.
>
> Now, if I have a custom `FindSQLite3.cmake` module and I do
> target_link_libraries(soci_sqlite3 PUBLIC ${SQLITE3_LIBRARIES})
> in CMakeLists.txt of the SOCI library, then in soci-config.cmake I do
> find_dependency(SQLite3)
> Is that correct?
>
> Now, am I supposed to deploy the FindSQLite3.cmake along
> soci-config.cmake to match the ${SQLITE3_LIBRARIES}?
> What if a user of SOCI (or even CMake distribution) comes with
> custom FindSQLite3.cmake which actually defines targets
> instead of old-style variables
> or defines SQLITE_LIBRARIES (without 3 in  SQLITE)?
>
> How to handle such situations?


Or, what to put into soci-config.cmake to screw things up the least,
to handle easiest scenario possible?

I'll appreciate any insights.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to