@@ -8,11 +8,6 @@ HunterGate(
88
99project (libwebp C)
1010
11- hunter_add_package(PNG)
12- hunter_add_package(Jpeg)
13- hunter_add_package(TIFF)
14- hunter_add_package(giflib)
15-
1611# Options for coder / decoder executables.
1712option (WEBP_ENABLE_SIMD "Enable any SIMD optimization." ON )
1813option (WEBP_BUILD_CWEBP "Build the cwebp command line tool." OFF )
@@ -54,7 +49,7 @@ if(ANDROID)
5449 add_library (cpufeatures STATIC
5550 ${ANDROID_NDK} /sources /android/cpufeatures/cpu-features.c
5651 )
57- target_link_libraries (cpufeatures dl)
52+ target_link_libraries (cpufeatures PUBLIC dl)
5853 set (WEBP_DEP_LIBRARIES ${WEBP_DEP_LIBRARIES} cpufeatures)
5954 set (WEBP_DEP_INCLUDE_DIRS ${WEBP_DEP_INCLUDE_DIRS}
6055 ${ANDROID_NDK} /sources /android/cpufeatures
@@ -127,7 +122,7 @@ add_library(webputilsdecode OBJECT ${WEBP_UTILS_COMMON_SRCS}
127122 ${WEBP_UTILS_DEC_SRCS} )
128123add_library (webpdecoder $<TARGET_OBJECTS:webpdecode>
129124 $<TARGET_OBJECTS:webpdspdecode> $<TARGET_OBJECTS:webputilsdecode>)
130- target_link_libraries (webpdecoder ${WEBP_DEP_LIBRARIES} )
125+ target_link_libraries (webpdecoder PUBLIC ${WEBP_DEP_LIBRARIES} )
131126
132127# Build the webp library.
133128add_library (webpencode OBJECT ${WEBP_ENC_SRCS} )
@@ -137,7 +132,7 @@ add_library(webputils OBJECT ${WEBP_UTILS_COMMON_SRCS} ${WEBP_UTILS_DEC_SRCS}
137132 ${WEBP_UTILS_ENC_SRCS} )
138133add_library (webp $<TARGET_OBJECTS:webpdecode> $<TARGET_OBJECTS:webpdsp>
139134 $<TARGET_OBJECTS:webpencode> $<TARGET_OBJECTS:webputils>)
140- target_link_libraries (webp ${WEBP_DEP_LIBRARIES} )
135+ target_link_libraries (webp PUBLIC ${WEBP_DEP_LIBRARIES} )
141136
142137# Make sure the OBJECT libraries are built with position independent code
143138# (it is not ON by default).
@@ -146,7 +141,7 @@ set_target_properties(webpdecode webpdspdecode webputilsdecode
146141
147142# Build the webp demux library.
148143add_library (webpdemux ${WEBP_DEMUX_SRCS} )
149- target_link_libraries (webpdemux webp)
144+ target_link_libraries (webpdemux PUBLIC webp)
150145
151146# Set the version numbers.
152147function (parse_version FILE NAME VAR)
@@ -198,19 +193,19 @@ if(WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP OR
198193 parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR} /imageio "IMAGEIOUTILS_SRCS"
199194 "imageio_util_[^ ]*" )
200195 add_library (imageioutil ${IMAGEIOUTILS_SRCS} )
201- target_link_libraries (imageioutil webp)
196+ target_link_libraries (imageioutil PUBLIC webp ${WEBP_DEP_IMG_LIBRARIES} )
202197
203198 # Image-decoding utility library.
204199 parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR} /imageio "IMAGEDEC_SRCS"
205200 "imagedec_[^ ]*" )
206201 add_library (imagedec ${IMAGEDEC_SRCS} )
207- target_link_libraries (imagedec imageioutil webp ${WEBP_DEP_IMG_LIBRARIES} )
202+ target_link_libraries (imagedec PUBLIC imageioutil webp ${WEBP_DEP_IMG_LIBRARIES} )
208203
209204 # Image-encoding utility library.
210205 parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR} /imageio "IMAGEENC_SRCS"
211206 "imageenc_[^ ]*" )
212207 add_library (imageenc ${IMAGEENC_SRCS} )
213- target_link_libraries (imageenc webp)
208+ target_link_libraries (imageenc PUBLIC webp ${WEBP_DEP_IMG_LIBRARIES} )
214209
215210 set_property (TARGET exampleutil imageioutil imagedec imageenc
216211 PROPERTY INCLUDE_DIRECTORIES
@@ -249,7 +244,7 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP)
249244 parse_Makefile_am(${CMAKE_CURRENT_SOURCE_DIR} /src/mux "WEBP_MUX_SRCS"
250245 "" )
251246 add_library (webpmux ${WEBP_MUX_SRCS} )
252- target_link_libraries (webpmux webp)
247+ target_link_libraries (webpmux PUBLIC webp)
253248 parse_version(mux/Makefile.am webpmux WEBP_MUX_SOVERSION)
254249 set_target_properties (webpmux PROPERTIES VERSION ${PACKAGE_VERSION}
255250 SOVERSION ${WEBP_MUX_SOVERSION} )
0 commit comments