-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsinsp: Refine pkg-config file generation.
The generated pkg-config file now makes use of pkg-config Requires and Requires.static fields, which should reduce over-linking when linking to shared libraries. * userspace/libscap/libscap.pc.in (prefix): Set directly to CMAKE_INSTALL_PREFIX. (Libs): Add -L{libdir}/@LIBS_PACKAGE_NAME@/libscap. * userspace/libsinsp/CMakeLists.txt: Separate libraries into pkg-config Requires and Requires.private lists. Do not infer from installable targets. * userspace/libsinsp/libsinsp.pc.in (Requires): Add @LIBSINSP_REQUIRES@. (Requires.private): New field. (Libs): Replace @SINSP_PKG_CONFIG_LIBDIRS@ and @SINSP_PKG_CONFIG_LIBS@ with @LIBSINSP_LINK_FLAGS@. (Cflags): Remove @SINSP_PKG_CONFIG_INCLUDES@ and @SINSP_PKG_CONFIG_INCLUDES@/driver. Add -I${includedir}/@LIBS_PACKAGE_NAME@/driver. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
- Loading branch information
Showing
3 changed files
with
30 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
prefix=${pcfiledir}/../.. | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
|
||
Name: libscap | ||
Description: lib for System CAPture | ||
Version: @FALCOSECURITY_LIBS_VERSION@ | ||
|
||
Libs: -L${libdir} @LIBSCAP_LINK_LIBDIRS_FLAGS@ @LIBSCAP_LINK_LIBRARIES_FLAGS@ | ||
Requires: zlib | ||
Libs: -L${libdir} -L{libdir}/@LIBS_PACKAGE_NAME@/libscap @LIBSCAP_LINK_LIBDIRS_FLAGS@ @LIBSCAP_LINK_LIBRARIES_FLAGS@ | ||
Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libscap -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
prefix=${pcfiledir}/../.. | ||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ | ||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ | ||
|
||
Name: libsinsp | ||
Description: lib for System INSPection | ||
Version: @FALCOSECURITY_LIBS_VERSION@ | ||
|
||
Requires: libscap | ||
Libs: -L${libdir} -lsinsp @SINSP_PKG_CONFIG_LIBDIRS@ @SINSP_PKG_CONFIG_LIBS@ | ||
Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libsinsp -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ @SINSP_PKG_CONFIG_INCLUDES@ | ||
Requires: libscap @LIBSINSP_REQUIRES@ | ||
Requires.private: @LIBSINSP_REQUIRES_PRIVATE@ | ||
Libs: -L${libdir} -lsinsp @LIBSINSP_LINK_FLAGS@ | ||
Cflags: -I${includedir}/@LIBS_PACKAGE_NAME@/libsinsp -I${includedir}/@LIBS_PACKAGE_NAME@/driver -I${includedir}/@LIBS_PACKAGE_NAME@ |