@@ -40,16 +40,34 @@ That's it, you are good to go.
40
40
41
41
### Use CMake's [ ` find_package() ` ] ( https://cmake.org/cmake/help/latest/command/find_package.html )
42
42
43
+ #### Option #1 : ` make install ` (Preferred way)
44
+
43
45
After building the project, you can install it locally using ` make install ` .
44
46
In your project's CMake file, you can then add the following snippet, and CMake will handle the rest:
45
47
```
46
- find_package(pfs)
47
- include_directories (${pfs_INCLUDE_DIRS})
48
+ find_package (pfs REQUIRED)
49
+ ...
50
+ # Somewhere along the file you define your target
51
+ add_<library|executable> (<your-target> ...)
48
52
...
49
53
target_link_libraries (<your-target> pfs)
50
54
```
51
55
52
- CMake generates an ` install_manifest.txt ` file to track all the created files, this will help you uninstall the library if you need to do so.
56
+ NOTE: CMake generates an ` install_manifest.txt ` file to track all the created files, this will help you uninstall the library if you need to do so.
57
+
58
+ #### Option #2 : Without ` make install `
59
+
60
+ Build the ` pfs ` project. No need to call ` make install ` .
61
+ In your project's CMake file, you can then add the following snippet:
62
+ ```
63
+ find_package (pfs REQUIRED)
64
+ ...
65
+ # Somewhere along the file you define your target
66
+ add_<library|executable> (<your-target> ...)
67
+ ...
68
+ target_link_libraries (<your-target> -L${pfs_LIBRARY_DIR} ${pfs_LIBRARIES})
69
+ target_include_directories (<your-target> [PUBLIC|PRIVATE] ${pfs_INCLUDE_DIRS})
70
+ ```
53
71
54
72
## Features
55
73
0 commit comments