Commit Graph

10 Commits

Author SHA1 Message Date
Vadim Zeitlin c1a4b7606f Require C++14 in CMake makefiles
Remove SOCI_CXX11 option which doesn't make sense any longer.
2022-09-18 17:28:57 +02:00
Robert Adam c68ef29ca7 Update documentation to new find_package call 2022-09-15 09:25:06 +02:00
Vadim Zeitlin 60dfd6b0a4 Rename library aliases to use shorter and more consistent names
Use "Soci::" rather than "SOCI::" as the prefix, for consistency with
the other CMake variables defined by FindSoci.cmake.

Do not use "soci_" prefix for the library names which is completely
redundant with the other prefix, writing "Soci::soci_" is clearly
redundant.

See #982.
2022-09-14 17:27:24 +02:00
Sam Hartsfield 24af920b8e Add generated include path to core targets
This removes the need to use target_include_directories when including SOCI
as a subdirectory, making subdir usage the same as find_package usage.
2022-08-05 16:10:03 -04:00
Sam Hartsfield 565c1c5437 Add namespaced aliases to library targets
This allows targets to be used the same way when included as a subdirectory
as when using find_package (when using as a subdirectory, the existing
non-namespace usage still works too).
2022-08-05 16:08:31 -04:00
Vadim Zeitlin d17047ad0b Fix another Markdown lint error
Add a header to the Markdown file as required by markdownlint.

See #925.
2022-01-14 15:39:51 +01:00
Lukas Zanner 17e8e40d37 Add example build to CI 2022-01-13 21:55:24 +01:00
Lukas Zanner f94a141bd0 Add documentation for using SOCI as a CMake subdirectory 2022-01-12 23:04:13 +01:00
Vadim Zeitlin 2bcc5ac55d Explain that target_include_directories() is not needed
Using just target_link_libraries() is sufficient, so update the comment
about (not) using target_include_directories() in the example
CMakeLists.txt and also mention this in the installation instructions.
2021-04-03 13:37:24 +02:00
Vadim Zeitlin 76b30dd6fc Add a very simple example of CMake project using SOCI
This shows both how to use SOCI API and, more importantly, how to build
a project using SOCI with CMake.

Note that CMake support is currently far from ideal:

- There is no way to get the compiler definitions and header directories
  needed to include the SOCI headers.
- There is no way to determine if SOCI was built as static or shared
  libraries or both and choose which ones to use.
- There is no way to check if a required backend is available.
- There is no way to get all the available backend libraries.

Ideally all of the above should be implemented, but for now this example
at least provides a testbed.
2021-04-02 15:31:53 +02:00