@@ -72,12 +72,12 @@ or library:
7272
7373``` cmake
7474add_executable(MyApp
75- # Sources go here
76- )
75+ # Sources go here
76+ )
7777target_link_libraries(MyApp
78- PRIVATE
79- projectM::Eval
80- )
78+ PRIVATE
79+ projectM::Eval
80+ )
8181```
8282
8383Important: 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
106106add_executable(MyApp
107- # Sources go here
108- )
107+ # Sources go here
108+ )
109109target_link_libraries(MyApp
110- PRIVATE
111- projectM::Eval
112- )
110+ PRIVATE
111+ projectM::Eval
112+ )
113113```
114114
115115If the target is a static library, to which the projectM-Eval object files should be added, then an additional line in
116116the target source list is required:
117117
118118``` cmake
119119add_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+ )
123123target_link_libraries(MyApp
124- PRIVATE
125- projectM::Eval
126- )
124+ PRIVATE
125+ projectM::Eval
126+ )
127127```
128128
129129Note 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.
134134If CMake is not an option, the static library can be linked manually and the ` projectm-eval.h ` header file can be copied
135135into 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+
137142To use it as an object library, please refer to the platform build tools on how to unpack the static library into its
138143object files or how to copy its contents into another static library.
139144
0 commit comments