This commit is contained in:
AlanRen 2022-09-18 04:18:06 +08:00
parent 12b7362ef5
commit 3cdc329853

View File

@ -13,31 +13,32 @@ set(CMAKE_CXX_FLAGS$ "${CMAKE_CXX_FLAGS} -fvisibility = hidden")
add_compile_options(-fPIC)
add_compile_options(-fvisibility=hidden)
add_compile_options(-std=c++11)
add_compile_options(-mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations -Wcast-align)
include(GNUInstallDirs)
include(GenerateExportHeader)
include_directories(include src)
add_definitions(-DGENERATE_EXPORT)
set(SecMedia_Root ${CMAKE_CURRENT_SOURCE_DIR}/src)
file(GLOB SecMedia_src_list ${SecMedia_Root}/*/*.cpp ${SecMedia_Root}/*/*.h ${SecMedia_Root}/*/*.c ${SecMedia_Root}/*/*/*.cpp ${SecMedia_Root}/*/*/*.h ${SecMedia_Root}/*/*/*.c)
file(GLOB SecMedia_api_list ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
# add_definitions(-DGENERATE_EXPORT)
# set(SecMedia_Root ${CMAKE_CURRENT_SOURCE_DIR}/src)
# file(GLOB SecMedia_src_list ${SecMedia_Root}/*/*.cpp ${SecMedia_Root}/*/*.h ${SecMedia_Root}/*/*.c ${SecMedia_Root}/*/*/*.cpp ${SecMedia_Root}/*/*/*.h ${SecMedia_Root}/*/*/*.c)
# file(GLOB SecMedia_api_list ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
# target_compile_options(${PROJECT_NAME} PRIVATE -fvisibility=hidden)
# # target_compile_options(${PROJECT_NAME} PRIVATE -fvisibility=hidden)
add_library(${PROJECT_NAME} SHARED ${SecMedia_src_list})
# add_library(${PROJECT_NAME} SHARED ${SecMedia_src_list})
#add_library(${PROJECT_NAME} STATIC ${SecMedia_src_list})
target_include_directories(${PROJECT_NAME} PRIVATE ${SecMedia_Root}/.)
# target_include_directories(${PROJECT_NAME} PRIVATE ${SecMedia_Root}/.)
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
PUBLIC_HEADER ${SecMedia_api_list}
)
# set_target_properties(${PROJECT_NAME} PROPERTIES
# VERSION ${PROJECT_VERSION}
# SOVERSION 1
# PUBLIC_HEADER ${SecMedia_api_list}
# )
# CXX_VISIBILITY_PRESET hidden
# CMAKE_C_FLAGS hidden)
set(LINK_LIB_LIST ${PROJECT_NAME} )
# set(LINK_LIB_LIST ${PROJECT_NAME} )
#MESSAGE(STATUS ${SecMedia_api_list})
#configure_file(SecMedia.pc.in SecMedia.pc @ONLY)