summarylogtreecommitdiffstats
path: root/cmake_install.patch
blob: e85e3a9ec1f135fe7cb978ec53e7185db1af3323 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
diff -rupN a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2021-04-23 16:34:08.000000000 -0700
+++ b/CMakeLists.txt	2021-12-27 15:34:25.764905166 -0800
@@ -330,6 +330,50 @@ add_library(webm ${libwebm_common_source
             $<TARGET_OBJECTS:mkvmuxer>
             $<TARGET_OBJECTS:mkvparser>)
 
+install(
+    TARGETS webm
+    RUNTIME DESTINATION bin
+    ARCHIVE DESTINATION lib
+    LIBRARY DESTINATION lib
+)
+
+install(
+  FILES
+    mkvmuxer.hpp
+    mkvmuxertypes.hpp
+    mkvmuxerutil.hpp
+    mkvparser.hpp
+    mkvreader.hpp
+    mkvwriter.hpp
+    webmids.hpp
+  DESTINATION
+    include/libwebm
+)
+
+install(
+  DIRECTORY mkvmuxer/
+  DESTINATION include/libwebm/mkvmuxer
+  FILES_MATCHING PATTERN "*.h"
+)
+
+install(
+  DIRECTORY mkvparser/
+  DESTINATION include/libwebm/mkvparser
+  FILES_MATCHING PATTERN "*.h"
+)
+
+install(
+  DIRECTORY webvtt/
+  DESTINATION include/libwebm/webvtt
+  FILES_MATCHING PATTERN "*.h"
+)
+
+install(
+  DIRECTORY common/
+  DESTINATION include/libwebm/common
+  FILES_MATCHING PATTERN "*.h"
+)
+
 if (WIN32)
   # Use libwebm and libwebm.lib for project and library name on Windows (instead
   # webm and webm.lib).
@@ -337,18 +381,22 @@ if (WIN32)
   set_target_properties(webm PROPERTIES PREFIX lib)
 endif ()
 
-add_executable(mkvparser_sample ${mkvparser_sample_sources})
-target_link_libraries(mkvparser_sample LINK_PUBLIC webm)
+if (ENABLE_SAMPLES)
+  add_executable(mkvparser_sample ${mkvparser_sample_sources})
+  target_link_libraries(mkvparser_sample LINK_PUBLIC webm)
 
-add_executable(mkvmuxer_sample ${mkvmuxer_sample_sources}
-               $<TARGET_OBJECTS:webvtt_common>)
-target_link_libraries(mkvmuxer_sample LINK_PUBLIC webm)
+  add_executable(mkvmuxer_sample ${mkvmuxer_sample_sources}
+                 $<TARGET_OBJECTS:webvtt_common>)
+  target_link_libraries(mkvmuxer_sample LINK_PUBLIC webm)
+endif()
 
-add_executable(dumpvtt ${dumpvtt_sources} $<TARGET_OBJECTS:webvtt_common>)
-target_link_libraries(dumpvtt LINK_PUBLIC webm)
+if (ENABLE_TOOLS)
+  add_executable(dumpvtt ${dumpvtt_sources} $<TARGET_OBJECTS:webvtt_common>)
+  target_link_libraries(dumpvtt LINK_PUBLIC webm)
 
-add_executable(vttdemux ${vttdemux_sources})
-target_link_libraries(vttdemux LINK_PUBLIC webm)
+  add_executable(vttdemux ${vttdemux_sources})
+  target_link_libraries(vttdemux LINK_PUBLIC webm)
+endif()
 
 if (ENABLE_WEBMINFO)
   add_executable(webm_info ${webm_info_sources})