Added cmake variables to make submoduling the project easier
That explains it
Coverage remained the same at 100.0% when pulling ce44286e96bcbba4c3b49f8f93d5a6f35bd65aa8 on abelmul:master into f0cd9e35864b173ef519f9fdba91a731ad94a28d on SRombauts:master.
Hello, thanks for this proposal.
I think that what you should do here is use the provided Find SQLiteCpp cmake file instead, no?
find_package(SQLiteCpp 3 REQUIRED)
Cheers
To quote the readme file in order to submodule and add this library you have to do
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp)
include_directories(
${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp/include
)
add_executable(main src/main.cpp)
target_link_libraries(main
SQLiteCpp
sqlite3
pthread
dl
)
With this pull request you can do
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp)
include_directories(${SQLITECPP_INCLUDE_DIRS})
add_executable(main src/main.cpp)
target_link_libraries(main ${SQLITECPP_LIBRARIES)
I think it keeps application code clean.
If linking multiple libraries is required then that hints at the fact that the SQLiteCpp target is missing some PUBLIC dependencies. That's the modern CMake solution and is preferable to the old school approach of having LIBNAME_INCLUDE_DIRS and LIBNAME_LIBRARIES variables.