diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a4e9e7e..ce7d08fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,6 +184,10 @@ if(GCC) add_definitions(-march=i686) endif() endif() + + set(CMAKE_C_VISIBILITY_PRESET hidden) + set(CMAKE_CXX_VISIBILITY_PRESET hidden) + # disable multichar warning add_definitions(-Wno-multichar) endif(GCC) diff --git a/mpp/CMakeLists.txt b/mpp/CMakeLists.txt index 0032f988..24b29de0 100644 --- a/mpp/CMakeLists.txt +++ b/mpp/CMakeLists.txt @@ -34,6 +34,7 @@ add_library(mpp STATIC ${MPP_SRC}) set_target_properties(mpp PROPERTIES FOLDER "mpp") set_target_properties(mpp PROPERTIES CLEAN_DIRECT_OUTPUT 1) target_link_libraries(mpp mpp_base mpp_codec mpp_hal) +set_target_properties(mpp PROPERTIES C_VISIBILITY_PRESET default) add_library(mpp_shared SHARED ${MPP_SRC}) set_target_properties(mpp_shared PROPERTIES FOLDER "mpp") diff --git a/mpp/legacy/CMakeLists.txt b/mpp/legacy/CMakeLists.txt index bf091c37..b56a485c 100644 --- a/mpp/legacy/CMakeLists.txt +++ b/mpp/legacy/CMakeLists.txt @@ -21,6 +21,8 @@ add_library(mpp_legacy_shared SHARED ${MPP_LEGACY_SRC}) set_target_properties(mpp_legacy_shared PROPERTIES FOLDER "mpp/legacy") set_target_properties(mpp_legacy_shared PROPERTIES OUTPUT_NAME "vpu") set_target_properties(mpp_legacy_shared PROPERTIES CLEAN_DIRECT_OUTPUT 1) +set_target_properties(mpp_legacy_shared PROPERTIES C_VISIBILITY_PRESET default) +set_target_properties(mpp_legacy_shared PROPERTIES CXX_VISIBILITY_PRESET default) if(RKPLATFORM) target_link_libraries(mpp_legacy_shared worker_vpu dl mpp_shared)