From a59455b52b11dabd09f6d5d2a2be80df2fd300fd Mon Sep 17 00:00:00 2001 From: Jim-Wang Date: Tue, 12 Nov 2024 06:19:10 +0000 Subject: [PATCH 1/3] add export config --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0089eee0..9ab455883 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -459,13 +459,19 @@ endif() # webm_parser headers are rooted at webm/. set_target_properties(webm PROPERTIES PUBLIC_HEADER "${webm_parser_public_headers}") +set_target_properties(webm PROPERTIES EXPORT_NAME libwebm) +target_include_directories(webm PUBLIC $) install( - TARGETS webm + TARGETS webm EXPORT unofficial-libwebm-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm) +install(EXPORT unofficial-libwebm-targets + FILE unofficial-libwebm-targets.cmake + NAMESPACE unofficial::libwebm:: + DESTINATION share/unofficial-libwebm) # Install common headers into a subdirectory to avoid breaking nested includes. install(FILES ${libwebm_common_public_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm/common) From bed215704fbca2421ede0d0870415b5e1dc41c5f Mon Sep 17 00:00:00 2001 From: Jim-Wang Date: Mon, 18 Nov 2024 06:39:27 +0000 Subject: [PATCH 2/3] modify export name --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ab455883..a43069284 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -462,16 +462,16 @@ set_target_properties(webm PROPERTIES PUBLIC_HEADER set_target_properties(webm PROPERTIES EXPORT_NAME libwebm) target_include_directories(webm PUBLIC $) install( - TARGETS webm EXPORT unofficial-libwebm-targets + TARGETS webm EXPORT libwebm-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm) -install(EXPORT unofficial-libwebm-targets - FILE unofficial-libwebm-targets.cmake - NAMESPACE unofficial::libwebm:: - DESTINATION share/unofficial-libwebm) +install(EXPORT libwebm-targets + FILE libwebm-targets.cmake + NAMESPACE libwebm:: + DESTINATION share/libwebm) # Install common headers into a subdirectory to avoid breaking nested includes. install(FILES ${libwebm_common_public_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm/common) From e61e5ae2e4acba7bc6f1f5fc3233e184632c5713 Mon Sep 17 00:00:00 2001 From: Jim-Wang Date: Mon, 18 Nov 2024 06:40:27 +0000 Subject: [PATCH 3/3] modify export name --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a43069284..7504ebfdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -469,8 +469,7 @@ install( PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/webm) install(EXPORT libwebm-targets - FILE libwebm-targets.cmake - NAMESPACE libwebm:: + FILE libwebm-config.cmake DESTINATION share/libwebm) # Install common headers into a subdirectory to avoid breaking nested includes. install(FILES ${libwebm_common_public_headers}