conditional compile swappy (#247)

This commit is contained in:
Zeqiang Li 2022-04-14 18:12:30 +08:00 committed by GitHub
parent dae690a354
commit ea41ab8f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -47,16 +47,24 @@ endif()
# add dependent boost libs
include(${CMAKE_CURRENT_LIST_DIR}/boost-source/boost.cmake)
if(ANDROID AND CC_ENABLE_SWAPPY)
include(${CMAKE_CURRENT_LIST_DIR}/Swappy/src/swappy/CMakeLists.txt)
list(APPEND CC_EXTERNAL_LIBS
swappy
)
add_definitions(-DCC_SWAPPY_ENABLED)
endif()
if(ANDROID OR OHOS)
include(${CMAKE_CURRENT_LIST_DIR}/pvmp3dec/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/tremolo/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Swappy/src/swappy/CMakeLists.txt)
list(APPEND CC_EXTERNAL_LIBS
pvmp3dec
vorbisidec
swappy
)
elseif(WINDOWS)

View File

@ -112,9 +112,6 @@ add_library(swappy
SHARED
${SWAPPY_C_SRC})
set(SWAPPY_ENABLED FALSE)
add_definitions(-DSWAPPY_ENABLED)
set(LIBS
swappy_static
android