mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:53:32 +03:00
build: strip duplicate spaces after Libs.private: in libcurl.pc
When `LIBCURL_PC_LDFLAGS_PRIVATE` is empty and `LIBCURL_PC_LIBS_PRIVATE` is not. To keep it tidy. Closes #22544
This commit is contained in:
parent
3b0cb22eb6
commit
2c22d3069a
2 changed files with 4 additions and 3 deletions
|
|
@ -2362,9 +2362,10 @@ if(NOT CURL_DISABLE_INSTALL)
|
|||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/libcurl.pc.in"
|
||||
"${PROJECT_BINARY_DIR}/libcurl.pc" @ONLY)
|
||||
# Strip trailing spaces
|
||||
# Strip trailing spaces, and duplicate spaces after colon
|
||||
file(READ "${PROJECT_BINARY_DIR}/libcurl.pc" _libcurl_pc)
|
||||
string(REGEX REPLACE " +\n" "\n" _libcurl_pc "${_libcurl_pc}")
|
||||
string(REGEX REPLACE "\nLibs\.private: +" "\nLibs.private: " _libcurl_pc "${_libcurl_pc}")
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/libcurl.pc" "${_libcurl_pc}")
|
||||
install(FILES "${PROJECT_BINARY_DIR}/libcurl.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
|
|
|||
|
|
@ -5559,8 +5559,8 @@ AC_CONFIG_FILES([\
|
|||
])
|
||||
AC_CONFIG_FILES([curl-config], [chmod +x curl-config])
|
||||
AC_CONFIG_FILES([libcurl.pc], [
|
||||
dnl strip trailing spaces
|
||||
"$SED" 's/ *$//g' libcurl.pc > libcurl.pc.tmp && mv libcurl.pc.tmp libcurl.pc
|
||||
dnl strip trailing spaces, and duplicate spaces after colon
|
||||
"$SED" -e 's/ *$//g' -e 's/^Libs\.private: */Libs.private: /g' libcurl.pc > libcurl.pc.tmp && mv libcurl.pc.tmp libcurl.pc
|
||||
], [SED="$SED"])
|
||||
AC_OUTPUT
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue