summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Jackson <simon.jackson@sonocent.com>2023-06-02 11:11:38 +0100
committerSi Jackson <simon.jackson@glean.co>2023-06-05 19:49:33 +0000
commit985545090a13fcb318834e2a880e715ba0fb03b1 (patch)
tree471c4a3f6f356c921040614f3d6844d1051a6a28
parent233c0e9a985b54845952310478dbd822f4ca5d4d (diff)
downloadlibwebm-985545090a13fcb318834e2a880e715ba0fb03b1.tar.gz
Add option to disable building of sample programs
Change-Id: Ic07779ac84b56a8ce2bdabaa2fc4ae9d30ceb811
-rw-r--r--CMakeLists.txt21
1 files changed, 12 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b8e577..f3e5683 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,7 @@ option(ENABLE_TESTS "Enables tests." OFF)
option(ENABLE_IWYU "Enables include-what-you-use support." OFF)
option(ENABLE_WERROR "Enable warnings as errors." OFF)
option(ENABLE_WEBM_PARSER "Enables new parser API." OFF)
+option(ENABLE_SAMPLE_PROGRAMS "Enables building sample programs." ON)
if(WIN32 OR CYGWIN OR MSYS)
# Allow use of rand_r() / fdopen() and other POSIX functions.
@@ -356,18 +357,20 @@ 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_SAMPLE_PROGRAMS)
+ 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)
-add_executable(dumpvtt ${dumpvtt_sources} $<TARGET_OBJECTS:webvtt_common>)
-target_link_libraries(dumpvtt LINK_PUBLIC webm)
+ 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})