diff options
author | Chris Robinson <[email protected]> | 2018-03-29 18:57:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-03-29 18:57:48 -0700 |
commit | a2c24ff946623b74df6ca7884f549a76911ebe8b (patch) | |
tree | e50f542944b09e94d13206ad87400f5580d590f4 /CMakeLists.txt | |
parent | 61de399806f777dc111d30d0ed9ef820a83ede81 (diff) |
Specify Libs.private for the pkg-config file
Only used when building the static lib for its dependencies, since the shared
lib automatically handles its own dependencies.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 07454f15..69e5528c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1261,8 +1261,19 @@ SET(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") SET(bindir "\${exec_prefix}/${CMAKE_INSTALL_BINDIR}") SET(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") SET(PACKAGE_VERSION "${LIB_VERSION}") +SET(PKG_CONFIG_CFLAGS ) +SET(PKG_CONFIG_PRIVATE_LIBS ) IF(LIBTYPE STREQUAL "STATIC") - SET(PKG_CONFIG_CFLAGS -DAL_LIBTYPE_STATIC ${PKG_CONFIG_CFLAGS}) + SET(PKG_CONFIG_CFLAGS -DAL_LIBTYPE_STATIC) + FOREACH(FLAG ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB}) + # If this is already a linker flag, or is a full path+file, add it + # as-is. Otherwise, it's a name intended to be dressed as -lname. + IF(FLAG MATCHES "^-.*" OR EXISTS "${FLAG}") + SET(PKG_CONFIG_PRIVATE_LIBS "${PKG_CONFIG_PRIVATE_LIBS} ${FLAG}") + ELSE() + SET(PKG_CONFIG_PRIVATE_LIBS "${PKG_CONFIG_PRIVATE_LIBS} -l${FLAG}") + ENDIF() + ENDFOREACH() ENDIF() # End configuration |