Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake build #10

Open
hsdk123 opened this issue Jan 20, 2020 · 2 comments
Open

CMake build #10

hsdk123 opened this issue Jan 20, 2020 · 2 comments

Comments

@hsdk123
Copy link

hsdk123 commented Jan 20, 2020

Hi, I see a cmake build option for both ogg and vorbis, but not this great theora library. It would be great to be able to request one.

@jhasse
Copy link
Contributor

jhasse commented Feb 27, 2020

This is how I include libtheora in my CMake project:

set(THEORA_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/theora)
if ((NOT EXISTS ${THEORA_SRC_DIR}) OR (NOT EXISTS ${THEORA_SRC_DIR}/CMakeLists.txt))
	execute_process(COMMAND git clone -b v1.1.1
	                https://git.xiph.org/theora.git
	                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/)
endif()
add_library(theoradec OBJECT ${LIBTHEORA_DEC} "${THEORA_SRC_DIR}/lib/apiwrapper.c"
	"${THEORA_SRC_DIR}/lib/bitpack.c" "${THEORA_SRC_DIR}/lib/dequant.c"
	"${THEORA_SRC_DIR}/lib/fragment.c" "${THEORA_SRC_DIR}/lib/idct.c"
	"${THEORA_SRC_DIR}/lib/info.c" "${THEORA_SRC_DIR}/lib/internal.c"
	"${THEORA_SRC_DIR}/lib/state.c" "${THEORA_SRC_DIR}/lib/quant.c"
	"${THEORA_SRC_DIR}/lib/decapiwrapper.c" "${THEORA_SRC_DIR}/lib/decinfo.c"
	"${THEORA_SRC_DIR}/lib/decode.c" "${THEORA_SRC_DIR}/lib/huffdec.c")
target_include_directories(theoradec PRIVATE ${OGG_INCLUDE_DIRS}
	"${THEORA_SRC_DIR}/include")
target_compile_options(theoradec PRIVATE -Wno-shift-negative-value
	-Wno-shift-op-parentheses)

@hsdk123
Copy link
Author

hsdk123 commented Apr 5, 2020

@jhasse Thanks, that works! Would be nice to have an official cmakelists though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants