Skip to content

Commit 76f4d7c

Browse files
authored
Merge pull request #605 from undisputed-seraphim/readme-fix
Update documentation on CMake
2 parents 5443933 + a4ae9f1 commit 76f4d7c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ You might need admin rights for the last command.
769769

770770
# Usage
771771

772-
## Cmake
772+
## CMake
773773

774774
If you use cmake, there are two supported ways how to use it with cmake (if another works as well or should be supported, open an issue).
775775

@@ -779,12 +779,18 @@ Either way you choose, the include path as well as the dependency sqlite3 will b
779779

780780
If you have installed the lib system wide and it's in your PATH, you can use find_package to include it in cmake. It will make a target `sqlite_orm::sqlite_orm` available which you can link against. Have a look at examples/find_package for a full example.
781781

782+
```cmake
783+
find_package(SqliteOrm REQUIRED)
784+
785+
target_link_libraries(main PRIVATE sqlite_orm::sqlite_orm)
786+
```
787+
782788
## Fetch Content (Recommended)
783789

784790
Alternatively, cmake can download the project directly from github during configure stage and therefore you don't need to install the lib before.
785791
Againt a target `sqlite_orm::sqlite_orm` will be available which you can link against. Have a look at examples/fetch_content for a full example.
786792

787-
## None cmake
793+
## No CMake
788794

789795
If you want to use the lib directly with Make or something else, just set the inlcude path correctly (should be correct on Linux already), so `sqlite_orm/sqlite_orm.h` is found. As this is a header only lib, there is nothing more you have to do.
790796

0 commit comments

Comments
 (0)