diff options
author | James Zern <jzern@google.com> | 2023-06-21 21:48:51 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2023-06-22 11:52:44 -0700 |
commit | 5101d05db27e7405392ce27c912d7a0ddeccfe7b (patch) | |
tree | 721b7c78f4569103cceefc575d5a0ac1d6aeb7d5 | |
parent | 09fa88a78c820929419a3f2126d7c7ba72372c6b (diff) | |
download | libwebm-5101d05db27e7405392ce27c912d7a0ddeccfe7b.tar.gz |
cmake: install mkvmuxer/mkvparser to subdirectories
This matches the include structure of the examples.
The install now looks like:
include/webm/buffer_reader.h
include/webm/callback.h
include/webm/common/webmids.h
include/webm/dom_types.h
include/webm/element.h
include/webm/file_reader.h
include/webm/id.h
include/webm/istream_reader.h
include/webm/mkvmuxer/mkvmuxer.h
include/webm/mkvmuxer/mkvmuxertypes.h
include/webm/mkvmuxer/mkvmuxerutil.h
include/webm/mkvmuxer/mkvwriter.h
include/webm/mkvparser/mkvparser.h
include/webm/mkvparser/mkvreader.h
include/webm/reader.h
include/webm/status.h
include/webm/webm_parser.h
Bug: webm:1805
Fixed: webm:1805
Change-Id: I84cf5e6de3ad3bbda97c4643e3968182dd5e24f3
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a35f34..85b2603 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -334,9 +334,6 @@ set(webvtt_common_sources set(vttdemux_sources ${webvtt_common_sources} "${LIBWEBM_SRC_DIR}/vttdemux.cc") -# Public headers that will be installed with the library. -set(webm_public_headers ${mkvmuxer_public_headers} ${mkvparser_public_headers}) - # Targets. add_library(mkvmuxer OBJECT ${mkvmuxer_sources}) add_library(mkvparser OBJECT ${mkvparser_sources}) @@ -372,8 +369,6 @@ if(ENABLE_WEBM_PARSER) add_executable(webm_parser_demo ${webm_parser_demo_sources}) target_link_libraries(webm_parser_demo LINK_PUBLIC webm) - - list(APPEND webm_public_headers ${webm_parser_public_headers}) endif() if(ENABLE_WEBMTS) @@ -459,7 +454,9 @@ if(ENABLE_IWYU) endif() endif() -set_target_properties(webm PROPERTIES PUBLIC_HEADER "${webm_public_headers}") +# webm_parser headers are rooted at webm/. +set_target_properties(webm PROPERTIES PUBLIC_HEADER + "${webm_parser_public_headers}") install( TARGETS webm ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -470,3 +467,8 @@ install( # Install common headers into a subdirectory to avoid breaking nested includes. install(FILES ${libwebm_common_public_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm/common) +# mkvmuxer and mkvparser headers are referenced with their prefix. +install(FILES ${mkvmuxer_public_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm/mkvmuxer) +install(FILES ${mkvparser_public_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm/mkvparser) |