Add Ogg, Vorbis and Theora as static decoder-only submodules for cutscene videos
This commit is contained in:
1 parent
78a2680134
commit
76c594f9a0
6 files changed
+47
-2
No files matched your search
+31
-1
@@ -35,6 +35,36 @@ add_library(simdjson STATIC external/simdjson/singleheader/simdjson.cpp)
|
||||
target_include_directories(simdjson SYSTEM PUBLIC external/simdjson/singleheader)
|
||||
target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0)
|
||||
|
||||
# Xiph's Ogg, Vorbis and Theora for the cutscene videos (.ogv): static, decoders only.
|
||||
set(INCLUDE_INTTYPES_H 1)
|
||||
set(INCLUDE_STDINT_H 1)
|
||||
set(INCLUDE_SYS_TYPES_H 1)
|
||||
set(SIZE16 int16_t)
|
||||
set(USIZE16 uint16_t)
|
||||
set(SIZE32 int32_t)
|
||||
set(USIZE32 uint32_t)
|
||||
set(SIZE64 int64_t)
|
||||
set(USIZE64 uint64_t)
|
||||
configure_file(external/ogg/include/ogg/config_types.h.in ${CMAKE_BINARY_DIR}/xiph/ogg/config_types.h @ONLY)
|
||||
add_library(ogg STATIC external/ogg/src/bitwise.c external/ogg/src/framing.c)
|
||||
target_include_directories(ogg SYSTEM PUBLIC external/ogg/include ${CMAKE_BINARY_DIR}/xiph)
|
||||
|
||||
file(GLOB VORBIS_SOURCES CONFIGURE_DEPENDS external/vorbis/lib/*.c)
|
||||
foreach(TOOL barkmel psytune tone vorbisenc)
|
||||
list(REMOVE_ITEM VORBIS_SOURCES ${CMAKE_SOURCE_DIR}/external/vorbis/lib/${TOOL}.c)
|
||||
endforeach()
|
||||
add_library(vorbis STATIC ${VORBIS_SOURCES})
|
||||
target_include_directories(vorbis SYSTEM PUBLIC external/vorbis/include PRIVATE external/vorbis/lib)
|
||||
target_link_libraries(vorbis PUBLIC ogg)
|
||||
|
||||
set(THEORA_DECODER apiwrapper bitpack decapiwrapper decinfo decode dequant fragment huffdec idct info internal quant state)
|
||||
list(TRANSFORM THEORA_DECODER PREPEND external/theora/lib/)
|
||||
list(TRANSFORM THEORA_DECODER APPEND .c)
|
||||
add_library(theora STATIC ${THEORA_DECODER})
|
||||
target_include_directories(theora SYSTEM PUBLIC external/theora/include)
|
||||
target_link_libraries(theora PUBLIC ogg)
|
||||
target_compile_options(theora PRIVATE -w)
|
||||
|
||||
# The curated game: src/*.cpp, written on top of the declarations generated-src/classes.h holds for every class.
|
||||
# generated-src/'s own bodies stay out until they compile (scripts/source_tree.py --check reports how many do).
|
||||
# generated-src/stubs.cpp defines everything not curated yet as a stub that stops the game where it is reached, so the
|
||||
@@ -43,4 +73,4 @@ file(GLOB SOURCES CONFIGURE_DEPENDS src/*.cpp)
|
||||
add_executable(isaac ${SOURCES} generated-src/stubs.cpp)
|
||||
target_include_directories(isaac PRIVATE src)
|
||||
target_include_directories(isaac SYSTEM PRIVATE generated-src external/stb)
|
||||
target_link_libraries(isaac PRIVATE SDL3::SDL3-static lua simdjson)
|
||||
target_link_libraries(isaac PRIVATE SDL3::SDL3-static lua simdjson theora vorbis ogg)
|
||||
Reference in new issue
Block a user