Skip to content

Commit a2f34d7

Browse files
committed
Mention pkg-config in the ReadMe
1 parent 67a223f commit a2f34d7

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

Diff for: ReadMe.md

+21-16
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ or library:
7272

7373
```cmake
7474
add_executable(MyApp
75-
# Sources go here
76-
)
75+
# Sources go here
76+
)
7777
target_link_libraries(MyApp
78-
PRIVATE
79-
projectM::Eval
80-
)
78+
PRIVATE
79+
projectM::Eval
80+
)
8181
```
8282

8383
Important: If your final target is a static library, this will _not_ copy any code into it! Any application using this
@@ -104,26 +104,26 @@ variant. To link the library as a static library, the CMake code is identical:
104104

105105
```cmake
106106
add_executable(MyApp
107-
# Sources go here
108-
)
107+
# Sources go here
108+
)
109109
target_link_libraries(MyApp
110-
PRIVATE
111-
projectM::Eval
112-
)
110+
PRIVATE
111+
projectM::Eval
112+
)
113113
```
114114

115115
If the target is a static library, to which the projectM-Eval object files should be added, then an additional line in
116116
the target source list is required:
117117

118118
```cmake
119119
add_library(MyLib STATIC
120-
$<TARGET_OBJECTS:projectM::Eval>
121-
# Other sources go here
122-
)
120+
$<TARGET_OBJECTS:projectM::Eval>
121+
# Other sources go here
122+
)
123123
target_link_libraries(MyApp
124-
PRIVATE
125-
projectM::Eval
126-
)
124+
PRIVATE
125+
projectM::Eval
126+
)
127127
```
128128

129129
Note that the library still needs to be linked. While this won't add any code to the target, it will populate the
@@ -134,6 +134,11 @@ required include directories and compiler flags needed to use the headers.
134134
If CMake is not an option, the static library can be linked manually and the `projectm-eval.h` header file can be copied
135135
into the project or pointed to via the include directory settings of the build system used.
136136

137+
On UNIX operating systems such as Linux, macOS or BSD and if `ENABLE_PROJECTM_EVAL_INSTALL` is enabled, a
138+
`projectm-eval.pc` pkg-config file will be installed into the destination library dir and can be used by any
139+
pkg-config-compatible build system to link the static library (using `pkg-config --libs projectm-eval`) and retrieve the
140+
correct include dir (using `pkg-config --cflags projectm-eval`).
141+
137142
To use it as an object library, please refer to the platform build tools on how to unpack the static library into its
138143
object files or how to copy its contents into another static library.
139144

0 commit comments

Comments
 (0)