diff options
author | H. Vetinari <h.vetinari@gmx.com> | 2022-10-21 21:06:25 +1100 |
---|---|---|
committer | H. Vetinari <h.vetinari@gmx.com> | 2022-12-10 21:37:47 +1100 |
commit | 14abd930c61ef3ad2842f5c6b7ea60693b0d4ff9 (patch) | |
tree | 78c91a20886ebbcb2f23318ac170262adf969402 /CMake/AbseilDll.cmake | |
parent | 88eee8b5111230cd85c712e2cd465cae3ec84064 (diff) |
add pkgconfig metadata for shared windows builds
Diffstat (limited to 'CMake/AbseilDll.cmake')
-rw-r--r-- | CMake/AbseilDll.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake index 30069da2..508939ae 100644 --- a/CMake/AbseilDll.cmake +++ b/CMake/AbseilDll.cmake @@ -545,6 +545,33 @@ function(absl_make_dll) ${ABSL_DEFAULT_COPTS} ) + foreach(cflag ${ABSL_CC_LIB_COPTS}) + if(${cflag} MATCHES "^(-Wno|/wd)") + # These flags are needed to suppress warnings that might fire in our headers. + set(PC_CFLAGS "${PC_CFLAGS} ${cflag}") + elseif(${cflag} MATCHES "^(-W|/w[1234eo])") + # Don't impose our warnings on others. + else() + set(PC_CFLAGS "${PC_CFLAGS} ${cflag}") + endif() + endforeach() + string(REPLACE ";" " " PC_LINKOPTS "${ABSL_CC_LIB_LINKOPTS}") + + FILE(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/lib/pkgconfig/abseil_dll.pc" CONTENT "\ +prefix=${CMAKE_INSTALL_PREFIX}\n\ +exec_prefix=\${prefix}\n\ +libdir=${CMAKE_INSTALL_FULL_LIBDIR}\n\ +includedir=${CMAKE_INSTALL_FULL_INCLUDEDIR}\n\ +\n\ +Name: abseil_dll\n\ +Description: Abseil DLL library\n\ +URL: https://abseil.io/\n\ +Version: ${absl_VERSION}\n\ +Libs: -L\${libdir} ${PC_LINKOPTS} $<$<NOT:$<BOOL:${ABSL_CC_LIB_IS_INTERFACE}>>:-labseil_dll>\n\ +Cflags: -I\${includedir}${PC_CFLAGS}\n") + INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/pkgconfig/abseil_dll.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + target_compile_definitions( abseil_dll PRIVATE |