]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/libtheora/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / libtheora / CMakeLists.txt
CommitLineData
1e59de90
TL
1cmake_minimum_required(VERSION 3.0)
2project(theora LANGUAGES C)
3
4set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
5FIND_PACKAGE(Ogg REQUIRED)
6
7file(GLOB HEADERS
8 "include/theora/codec.h"
9 "include/theora/theora.h"
10 "include/theora/theoradec.h"
11 "include/theora/theoraenc.h"
12)
13
14set(LIBTHEORA_COMMON
15 "lib/apiwrapper.c"
16 "lib/bitpack.c"
17 "lib/dequant.c"
18 "lib/fragment.c"
19 "lib/idct.c"
20 "lib/info.c"
21 "lib/internal.c"
22 "lib/state.c"
23 "lib/quant.c"
24
25 "lib/x86_vc/mmxfrag.c"
26 "lib/x86_vc/mmxidct.c"
27 "lib/x86_vc/mmxstate.c"
28 "lib/x86_vc/x86cpu.c"
29 "lib/x86_vc/x86state.c"
30)
31
32set(LIBTHEORA_ENC
33 "lib/analyze.c"
34 "lib/encapiwrapper.c"
35 "lib/encfrag.c"
36 "lib/encinfo.c"
37 "lib/encode.c"
38 "lib/enquant.c"
39 "lib/fdct.c"
40 "lib/huffenc.c"
41 "lib/mathops.c"
42 "lib/mcenc.c"
43 "lib/rate.c"
44 "lib/tokenize.c"
45
46 "lib/x86_vc/mmxencfrag.c"
47 "lib/x86_vc/mmxfdct.c"
48 "lib/x86_vc/x86enc.c"
49)
50
51set(LIBTHEORA_DEC
52 "lib/decapiwrapper.c"
53 "lib/decinfo.c"
54 "lib/decode.c"
55 "lib/huffdec.c"
56)
57
58add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
59add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
60
61option(USE_X86 "Use x86 optimization" OFF)
62if(USE_X86)
63 add_definitions(-DOC_X86_ASM)
64endif()
65
66if (BUILD_SHARED_LIBS)
67 add_definitions(-DLIBTHEORA_EXPORTS)
68endif()
69
70add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS})
71target_link_libraries(theora-common PUBLIC Ogg::ogg)
72target_include_directories(theora-common PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
73add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS})
74target_link_libraries(theora-enc PUBLIC Ogg::ogg)
75target_include_directories(theora-enc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
76add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS})
77target_link_libraries(theora-dec PUBLIC Ogg::ogg)
78target_include_directories(theora-dec PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
79
80add_library(theora $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> $<TARGET_OBJECTS:theora-dec> "libtheora.def")
81target_link_libraries(theora PUBLIC Ogg::ogg)
82target_include_directories(theora PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
83
84add_library(theoraenc $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> "win32/xmingw32/libtheoraenc-all.def")
85target_link_libraries(theoraenc PUBLIC Ogg::ogg)
86target_include_directories(theoraenc PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
87
88add_library(theoradec $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-dec> "win32/xmingw32/libtheoradec-all.def")
89target_link_libraries(theoradec PUBLIC Ogg::ogg)
90target_include_directories(theoradec PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
91
92include(CMakePackageConfigHelpers)
93
94configure_package_config_file(unofficial-theora-config.cmake.in unofficial-theora-config.cmake
95 INSTALL_DESTINATION "lib/unofficial-theora")
96
97install(FILES ${HEADERS} DESTINATION include/theora)
98
99install(
100 FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-theora-config.cmake"
101 DESTINATION "lib/unofficial-theora"
102)
103
104install(TARGETS theora theoraenc theoradec
105 EXPORT unofficial-theora-targets
106 RUNTIME DESTINATION bin
107 LIBRARY DESTINATION bin
108 ARCHIVE DESTINATION lib
109)
110
111install(EXPORT unofficial-theora-targets
112 NAMESPACE unofficial::theora::
113 DESTINATION "lib/unofficial-theora"
114)