mirror of
https://github.com/etlegacy/etlegacy-libs.git
synced 2025-02-24 12:11:11 +00:00
theora: only include the decoding sources
This commit is contained in:
parent
86d5df1b2d
commit
e60d369d21
1 changed files with 38 additions and 12 deletions
|
@ -105,7 +105,7 @@ if(WIN32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(64BITS)
|
if(ETL_64BITS)
|
||||||
set(openssl_plat VC-WIN64)
|
set(openssl_plat VC-WIN64)
|
||||||
# set(curl_plat x64)
|
# set(curl_plat x64)
|
||||||
else()
|
else()
|
||||||
|
@ -934,34 +934,60 @@ endif()
|
||||||
# Build bundled Theora library
|
# Build bundled Theora library
|
||||||
#-----------------------------------------------------------------
|
#-----------------------------------------------------------------
|
||||||
if(BUNDLED_THEORA AND BUILD_CLIENT)
|
if(BUNDLED_THEORA AND BUILD_CLIENT)
|
||||||
|
set(THEORA_SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/theora/lib)
|
||||||
FILE(GLOB THEORA_SRC
|
FILE(GLOB THEORA_SRC
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/theora/lib/*.c"
|
"${THEORA_SRC_DIR}/apiwrapper.c"
|
||||||
|
"${THEORA_SRC_DIR}/bitpack.c"
|
||||||
|
"${THEORA_SRC_DIR}/decapiwrapper.c"
|
||||||
|
"${THEORA_SRC_DIR}/decinfo.c"
|
||||||
|
"${THEORA_SRC_DIR}/decode.c"
|
||||||
|
"${THEORA_SRC_DIR}/dequant.c"
|
||||||
|
"${THEORA_SRC_DIR}/fragment.c"
|
||||||
|
"${THEORA_SRC_DIR}/huffdec.c"
|
||||||
|
"${THEORA_SRC_DIR}/idct.c"
|
||||||
|
"${THEORA_SRC_DIR}/info.c"
|
||||||
|
"${THEORA_SRC_DIR}/internal.c"
|
||||||
|
"${THEORA_SRC_DIR}/quant.c"
|
||||||
|
"${THEORA_SRC_DIR}/state.c"
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/theora/lib/*.h"
|
"${CMAKE_CURRENT_LIST_DIR}/theora/lib/*.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
# This makes the MSVC build a happier camper
|
# This makes the MSVC build a happier camper
|
||||||
LIST(REMOVE_ITEM THEORA_SRC ${CMAKE_CURRENT_LIST_DIR}/theora/lib/encoder_disabled.c)
|
LIST(REMOVE_ITEM THEORA_SRC ${CMAKE_CURRENT_LIST_DIR}/theora/lib/encoder_disabled.c)
|
||||||
|
|
||||||
if(32BITS)
|
if(ETL_X86 AND (ETL_32BITS OR ETL_64BITS))
|
||||||
add_definitions("-DOC_X86_ASM")
|
message(STATUS "Enabling theora ASM")
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
FILE(GLOB THEORA_ASM_SRC
|
set(THEORA_SRC_ASM_DIR ${THEORA_SRC_DIR}/x86_vc)
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/theora/lib/x86_vc/*.c"
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/theora/lib/x86_vc/*.h"
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
FILE(GLOB THEORA_ASM_SRC
|
set(THEORA_SRC_ASM_DIR ${THEORA_SRC_DIR}/x86)
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/theora/lib/x86/*.c"
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/theora/lib/x86/*.h"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
FILE(GLOB THEORA_ASM_SRC
|
||||||
|
"${THEORA_SRC_ASM_DIR}/mmxidct.c"
|
||||||
|
"${THEORA_SRC_ASM_DIR}/mmxfrag.c"
|
||||||
|
"${THEORA_SRC_ASM_DIR}/mmxstate.c"
|
||||||
|
"${THEORA_SRC_ASM_DIR}/x86state.c"
|
||||||
|
"${THEORA_SRC_ASM_DIR}/*.h"
|
||||||
|
)
|
||||||
|
|
||||||
LIST(APPEND THEORA_SRC ${THEORA_ASM_SRC})
|
LIST(APPEND THEORA_SRC ${THEORA_ASM_SRC})
|
||||||
|
else()
|
||||||
|
message(STATUS "Disabling theora ASM")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories("${CMAKE_CURRENT_LIST_DIR}/theora/include")
|
include_directories("${CMAKE_CURRENT_LIST_DIR}/theora/include")
|
||||||
add_library(bundled_theora STATIC ${THEORA_SRC})
|
add_library(bundled_theora STATIC ${THEORA_SRC})
|
||||||
|
|
||||||
|
if (ETL_X86)
|
||||||
|
if (ETL_32BITS OR ETL_64BITS)
|
||||||
|
target_compile_definitions(bundled_theora PUBLIC OC_X86_ASM)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ETL_64BITS)
|
||||||
|
target_compile_definitions(bundled_theora PUBLIC OC_X86_64_ASM)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
set(THEORA_BUNDLED_LIBRARIES bundled_theora)
|
set(THEORA_BUNDLED_LIBRARIES bundled_theora)
|
||||||
set(THEORA_BUNDLED_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/theora/include")
|
set(THEORA_BUNDLED_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/theora/include")
|
||||||
set_target_properties(bundled_theora PROPERTIES FOLDER ${BUNDLED_TARGETS_FOLDER})
|
set_target_properties(bundled_theora PROPERTIES FOLDER ${BUNDLED_TARGETS_FOLDER})
|
||||||
|
|
Loading…
Reference in a new issue