diff options
author | James Zern <jzern@google.com> | 2022-10-15 15:54:17 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2022-10-17 14:07:02 -0700 |
commit | 2498209ba9391b526e001f9fe01cba230dd9b10e (patch) | |
tree | 28ee9e3006d530c381d668aceaafd5988f8b339f | |
parent | d34f9b99b9d38e283fcba2e6b139ea886bc9fdf9 (diff) | |
download | libwebp-2498209ba9391b526e001f9fe01cba230dd9b10e.tar.gz |
*.pc.in: add lib prefix to lib names w/MSVC
this fixes the library names output after:
9ac25bcb3 CMakeLists.txt,win32: match naming convention used by nmake
before this change:
pkg-config --libs --msvc-syntax \
libwebp libwebpdemux libwebpmux libsharpyuv libwebpdecoder
/libpath:.../lib webpdemux.lib webpmux.lib webp.lib
sharpyuv.lib webpdecoder.lib
after:
pkg-config --libs --msvc-syntax \
libwebp libwebpdemux libwebpmux libsharpyuv libwebpdecoder
/libpath:.../lib libwebpdemux.lib libwebpmux.lib libwebp.lib
libsharpyuv.lib libwebpdecoder.lib
Bug: webp:584
Change-Id: Ic3693b58a40e0ba683333065003b1c00aab0cf48
Fixed: webp:584
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | sharpyuv/libsharpyuv.pc.in | 2 | ||||
-rw-r--r-- | src/demux/libwebpdemux.pc.in | 2 | ||||
-rw-r--r-- | src/libwebp.pc.in | 2 | ||||
-rw-r--r-- | src/libwebpdecoder.pc.in | 2 | ||||
-rw-r--r-- | src/mux/libwebpmux.pc.in | 2 |
6 files changed, 10 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e81a778d..272c2c60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,7 @@ if(MSVC AND BUILD_SHARED_LIBS) add_definitions(-DWEBP_DLL) endif() +# pkg-config variables used by *.pc.in. set(prefix ${CMAKE_INSTALL_PREFIX}) set(exec_prefix "\$\{prefix\}") set(libdir "\$\{prefix\}/lib") @@ -133,9 +134,10 @@ set(INSTALLED_LIBRARIES) if(MSVC) # match the naming convention used by nmake - set(CMAKE_SHARED_LIBRARY_PREFIX "lib") - set(CMAKE_IMPORT_LIBRARY_PREFIX "lib") - set(CMAKE_STATIC_LIBRARY_PREFIX "lib") + set(lib_prefix "lib") + set(CMAKE_SHARED_LIBRARY_PREFIX "${lib_prefix}") + set(CMAKE_IMPORT_LIBRARY_PREFIX "${lib_prefix}") + set(CMAKE_STATIC_LIBRARY_PREFIX "${lib_prefix}") endif() set(CMAKE_C_VISIBILITY_PRESET hidden) diff --git a/sharpyuv/libsharpyuv.pc.in b/sharpyuv/libsharpyuv.pc.in index 655b3dd3..b2943297 100644 --- a/sharpyuv/libsharpyuv.pc.in +++ b/sharpyuv/libsharpyuv.pc.in @@ -7,5 +7,5 @@ Name: libsharpyuv Description: Library for sharp RGB to YUV conversion Version: @PACKAGE_VERSION@ Cflags: -I${includedir} -Libs: -L${libdir} -lsharpyuv +Libs: -L${libdir} -l@lib_prefix@sharpyuv Libs.private: -lm @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ diff --git a/src/demux/libwebpdemux.pc.in b/src/demux/libwebpdemux.pc.in index 6dfbbbde..11441911 100644 --- a/src/demux/libwebpdemux.pc.in +++ b/src/demux/libwebpdemux.pc.in @@ -8,4 +8,4 @@ Description: Library for parsing the WebP graphics format container Version: @PACKAGE_VERSION@ Requires: libwebp >= 0.2.0 Cflags: -I${includedir} -Libs: -L${libdir} -lwebpdemux +Libs: -L${libdir} -l@lib_prefix@webpdemux diff --git a/src/libwebp.pc.in b/src/libwebp.pc.in index 8f98432c..59e1a403 100644 --- a/src/libwebp.pc.in +++ b/src/libwebp.pc.in @@ -8,5 +8,5 @@ Description: Library for the WebP graphics format Version: @PACKAGE_VERSION@ Requires: libsharpyuv Cflags: -I${includedir} -Libs: -L${libdir} -lwebp +Libs: -L${libdir} -l@lib_prefix@webp Libs.private: -lm @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ diff --git a/src/libwebpdecoder.pc.in b/src/libwebpdecoder.pc.in index 3ef647a9..01078f15 100644 --- a/src/libwebpdecoder.pc.in +++ b/src/libwebpdecoder.pc.in @@ -7,5 +7,5 @@ Name: libwebpdecoder Description: Library for the WebP graphics format (decode only) Version: @PACKAGE_VERSION@ Cflags: -I${includedir} -Libs: -L${libdir} -lwebpdecoder +Libs: -L${libdir} -l@lib_prefix@webpdecoder Libs.private: -lm @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ diff --git a/src/mux/libwebpmux.pc.in b/src/mux/libwebpmux.pc.in index a96fac78..21a6e7d7 100644 --- a/src/mux/libwebpmux.pc.in +++ b/src/mux/libwebpmux.pc.in @@ -8,5 +8,5 @@ Description: Library for manipulating the WebP graphics format container Version: @PACKAGE_VERSION@ Requires: libwebp >= 0.2.0 Cflags: -I${includedir} -Libs: -L${libdir} -lwebpmux +Libs: -L${libdir} -l@lib_prefix@webpmux Libs.private: -lm |