mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
Add -fvisibility=hidden flag in CMakeLists.
This way, only functions marked with WEBP_EXTERN get exposed by the library. This flag is already set in other build configs: configure.ac, makefile.unix, Android.mk Change-Id: Iafd8f160e539290e7ea46ceec764a090c6e626a9
This commit is contained in:
parent
5ecee06f7a
commit
1124ff662d
@ -117,6 +117,8 @@ set(includedir "\$\{prefix\}/include")
|
||||
set(PTHREAD_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
set(INSTALLED_LIBRARIES)
|
||||
|
||||
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
||||
|
||||
# ##############################################################################
|
||||
# Android only.
|
||||
if(ANDROID)
|
||||
@ -614,6 +616,13 @@ if(WEBP_BUILD_EXTRAS)
|
||||
parse_makefile_am(${EXTRAS_MAKEFILE} "WEBP_QUALITY_SRCS" "webp_quality")
|
||||
parse_makefile_am(${EXTRAS_MAKEFILE} "VWEBP_SDL_SRCS" "vwebp_sdl")
|
||||
|
||||
# libextras
|
||||
add_library(extras STATIC ${WEBP_EXTRAS_SRCS})
|
||||
target_include_directories(extras
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
|
||||
# get_disto
|
||||
add_executable(get_disto ${GET_DISTO_SRCS})
|
||||
target_link_libraries(get_disto imagedec)
|
||||
@ -622,8 +631,8 @@ if(WEBP_BUILD_EXTRAS)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
# webp_quality
|
||||
add_executable(webp_quality ${WEBP_QUALITY_SRCS} ${WEBP_EXTRAS_SRCS})
|
||||
target_link_libraries(webp_quality exampleutil imagedec)
|
||||
add_executable(webp_quality ${WEBP_QUALITY_SRCS})
|
||||
target_link_libraries(webp_quality exampleutil imagedec extras)
|
||||
target_include_directories(webp_quality
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
Loading…
Reference in New Issue
Block a user