diff options
author | Albert Astals Cid <aacid@kde.org> | 2024-10-18 18:47:53 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2024-10-18 18:56:16 +0200 |
commit | 38da08bb4df13bdc885b02df1ea4ef30d57d7b22 (patch) | |
tree | b981b972c48cdfc0c268dc4364e3cd53fa9bc0db | |
parent | 1a3a498acb4e5981ab0a077d3f0fa5f0ca16ea69 (diff) |
Run all_verify_interface_header_sets to make sure our headers are usable
-rw-r--r-- | .gitlab-ci.yml | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | cpp/CMakeLists.txt | 16 | ||||
-rw-r--r-- | glib/CMakeLists.txt | 17 | ||||
-rw-r--r-- | glib/poppler-action.h | 3 | ||||
-rw-r--r-- | glib/poppler-annot.h | 1 | ||||
-rw-r--r-- | glib/poppler-autocleanups.h | 27 | ||||
-rw-r--r-- | glib/poppler-document.h | 6 | ||||
-rw-r--r-- | glib/poppler-form-field.h | 4 | ||||
-rw-r--r-- | glib/poppler-page.h | 11 | ||||
-rw-r--r-- | glib/poppler-structure-element.h | 3 | ||||
-rw-r--r-- | glib/poppler.h | 1 | ||||
-rw-r--r-- | qt5/src/CMakeLists.txt | 16 | ||||
-rw-r--r-- | qt6/src/CMakeLists.txt | 16 |
14 files changed, 84 insertions, 39 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16682a49..ef4beba3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,6 +44,7 @@ build: - mkdir -p build && cd build - cmake -G Ninja -DTESTDATADIR=$PWD/../test-data -DCMAKE_PREFIX_PATH=$PWD/gnupg .. - ninja -j ${FDO_CI_CONCURRENT} + - ninja -j ${FDO_CI_CONCURRENT} all_verify_interface_header_sets - ctest --output-on-failure build_clang16_libcpp: diff --git a/CMakeLists.txt b/CMakeLists.txt index 0841022a..e2951fe6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,7 @@ set(CMAKE_LINK_DEPENDS_NO_SHARED TRUE) set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +set(CMAKE_VERIFY_INTERFACE_HEADER_SETS ON) # command line switches diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 80c38a35..450846dc 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -33,7 +33,7 @@ endif() target_link_libraries(poppler-cpp poppler Iconv::Iconv) install(TARGETS poppler-cpp RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES +set(poppler_cpp_all_install_headers poppler-destination.h poppler-document.h poppler-embedded-file.h @@ -48,5 +48,17 @@ install(FILES poppler-toc.h ${CMAKE_CURRENT_BINARY_DIR}/poppler_cpp_export.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-version.h - DESTINATION include/poppler/cpp) +) +if (${CMAKE_VERSION} VERSION_LESS "3.23.0") + install(FILES ${poppler_cpp_all_install_headers} DESTINATION include/poppler/cpp) +else() + target_sources(poppler-cpp + PUBLIC + FILE_SET HEADERS + BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR} + FILES + ${poppler_cpp_all_install_headers} + ) + install(TARGETS poppler-cpp FILE_SET HEADERS DESTINATION include/poppler/cpp) +endif() diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt index 6cd5d6a8..80a4d097 100644 --- a/glib/CMakeLists.txt +++ b/glib/CMakeLists.txt @@ -34,7 +34,6 @@ set(poppler_glib_public_headers poppler-layer.h poppler-movie.h poppler-media.h - poppler-autocleanups.h poppler.h poppler-structure-element.h ) @@ -104,12 +103,24 @@ if (ENABLE_NSS3) target_include_directories(poppler-glib SYSTEM PRIVATE ${NSS3_INCLUDE_DIRS}) endif() -install(FILES +set(poppler_glib_all_install_headers ${poppler_glib_public_headers} ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-features.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-macros.h - DESTINATION include/poppler/glib) +) +if (${CMAKE_VERSION} VERSION_LESS "3.23.0") + install(FILES ${poppler_glib_all_install_headers} DESTINATION include/poppler/glib) +else() + target_sources(poppler-glib + PUBLIC + FILE_SET HEADERS + BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR} + FILES + ${poppler_glib_all_install_headers} + ) + install(TARGETS poppler-glib FILE_SET HEADERS DESTINATION include/poppler/glib) +endif() set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-enums.c" diff --git a/glib/poppler-action.h b/glib/poppler-action.h index 6f38eed7..a7887355 100644 --- a/glib/poppler-action.h +++ b/glib/poppler-action.h @@ -455,4 +455,7 @@ guint8 *poppler_named_dest_to_bytestring(const char *name, gsize *length); G_END_DECLS +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerAction, poppler_action_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerDest, poppler_dest_free) + #endif /* __POPPLER_GLIB_H__ */ diff --git a/glib/poppler-annot.h b/glib/poppler-annot.h index 509ecdff..9f362b2f 100644 --- a/glib/poppler-annot.h +++ b/glib/poppler-annot.h @@ -21,6 +21,7 @@ #ifndef __POPPLER_ANNOT_H__ #define __POPPLER_ANNOT_H__ +#include <cairo.h> #include <glib-object.h> #include "poppler.h" diff --git a/glib/poppler-autocleanups.h b/glib/poppler-autocleanups.h deleted file mode 100644 index 7e5854e1..00000000 --- a/glib/poppler-autocleanups.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __POPPLER_AUTOCLEANUPS_H__ -#define __POPPLER_AUTOCLEANUPS_H__ - -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerAction, poppler_action_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerDest, poppler_dest_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerIndexIter, poppler_index_iter_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerFontInfo, poppler_font_info_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerFontsIter, poppler_fonts_iter_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerLayersIter, poppler_layers_iter_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerPSFile, poppler_ps_file_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerSignatureInfo, poppler_signature_info_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerSigningData, poppler_signing_data_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerCertificateInfo, poppler_certificate_info_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerRectangle, poppler_rectangle_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerPoint, poppler_point_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerQuadrilateral, poppler_quadrilateral_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerColor, poppler_color_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerTextAttributes, poppler_text_attributes_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerLinkMapping, poppler_link_mapping_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerPageTransition, poppler_page_transition_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerImageMapping, poppler_image_mapping_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerFormFieldMapping, poppler_form_field_mapping_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerAnnotMapping, poppler_annot_mapping_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerTextSpan, poppler_text_span_free) -G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerStructureElementIter, poppler_structure_element_iter_free) - -#endif /* __POPPLER_AUTOCLEANUPS_H__ */ diff --git a/glib/poppler-document.h b/glib/poppler-document.h index 56e5a9b7..acf76698 100644 --- a/glib/poppler-document.h +++ b/glib/poppler-document.h @@ -539,4 +539,10 @@ struct _PopplerPageRange G_END_DECLS +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerIndexIter, poppler_index_iter_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerFontInfo, poppler_font_info_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerFontsIter, poppler_fonts_iter_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerLayersIter, poppler_layers_iter_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerPSFile, poppler_ps_file_free) + #endif /* __POPPLER_DOCUMENT_H__ */ diff --git a/glib/poppler-form-field.h b/glib/poppler-form-field.h index 6cdf2240..35eb03fe 100644 --- a/glib/poppler-form-field.h +++ b/glib/poppler-form-field.h @@ -381,4 +381,8 @@ void poppler_set_nss_password_callback(PopplerNssPasswordFunc func); G_END_DECLS +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerSignatureInfo, poppler_signature_info_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerSigningData, poppler_signing_data_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerCertificateInfo, poppler_certificate_info_free) + #endif /* __POPPLER_FORM_FIELD_H__ */ diff --git a/glib/poppler-page.h b/glib/poppler-page.h index 3b629b8a..de4896f7 100644 --- a/glib/poppler-page.h +++ b/glib/poppler-page.h @@ -441,4 +441,15 @@ void poppler_annot_mapping_free(PopplerAnnotMapping *mapping); G_END_DECLS +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerRectangle, poppler_rectangle_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerPoint, poppler_point_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerQuadrilateral, poppler_quadrilateral_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerColor, poppler_color_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerTextAttributes, poppler_text_attributes_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerLinkMapping, poppler_link_mapping_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerPageTransition, poppler_page_transition_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerImageMapping, poppler_image_mapping_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerFormFieldMapping, poppler_form_field_mapping_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerAnnotMapping, poppler_annot_mapping_free) + #endif /* __POPPLER_PAGE_H__ */ diff --git a/glib/poppler-structure-element.h b/glib/poppler-structure-element.h index 05cef08e..649e22b2 100644 --- a/glib/poppler-structure-element.h +++ b/glib/poppler-structure-element.h @@ -422,4 +422,7 @@ const gchar *poppler_text_span_get_font_name(PopplerTextSpan *poppler_text_span) G_END_DECLS +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerTextSpan, poppler_text_span_free) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(PopplerStructureElementIter, poppler_structure_element_iter_free) + #endif /* !__POPPLER_STRUCTURE_ELEMENT_H__ */ diff --git a/glib/poppler.h b/glib/poppler.h index 0c9b9b29..70f2172a 100644 --- a/glib/poppler.h +++ b/glib/poppler.h @@ -259,6 +259,5 @@ G_END_DECLS #include "poppler-movie.h" #include "poppler-media.h" #include "poppler-structure-element.h" -#include "poppler-autocleanups.h" #endif /* __POPPLER_GLIB_H__ */ diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt index 8d7f6ee2..5b15cfb2 100644 --- a/qt5/src/CMakeLists.txt +++ b/qt5/src/CMakeLists.txt @@ -49,7 +49,7 @@ if(USE_CMS) endif() install(TARGETS poppler-qt5 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES +set(poppler_qt5_all_install_headers poppler-qt5.h poppler-link.h poppler-annotation.h @@ -59,5 +59,15 @@ install(FILES poppler-media.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-export.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-version.h - DESTINATION include/poppler/qt5) - +) +if (${CMAKE_VERSION} VERSION_LESS "3.23.0") + install(FILES ${poppler_qt5_all_install_headers} DESTINATION include/poppler/qt5) +else() + target_sources(poppler-qt5 + PUBLIC + FILE_SET HEADERS + BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR} + FILES ${poppler_qt5_all_install_headers} + ) + install(TARGETS poppler-qt5 FILE_SET HEADERS DESTINATION include/poppler/qt5) +endif() diff --git a/qt6/src/CMakeLists.txt b/qt6/src/CMakeLists.txt index b01f63fe..c9933bb5 100644 --- a/qt6/src/CMakeLists.txt +++ b/qt6/src/CMakeLists.txt @@ -49,7 +49,7 @@ if(USE_CMS) endif() install(TARGETS poppler-qt6 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES +set(poppler_qt6_all_install_headers poppler-qt6.h poppler-link.h poppler-annotation.h @@ -60,5 +60,15 @@ install(FILES poppler-converter.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-export.h ${CMAKE_CURRENT_BINARY_DIR}/poppler-version.h - DESTINATION include/poppler/qt6) - +) +if (${CMAKE_VERSION} VERSION_LESS "3.23.0") + install(FILES ${poppler_qt6_all_install_headers} DESTINATION include/poppler/qt6) +else() + target_sources(poppler-qt6 + PUBLIC + FILE_SET HEADERS + BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR} + FILES ${poppler_qt6_all_install_headers} + ) + install(TARGETS poppler-qt6 FILE_SET HEADERS DESTINATION include/poppler/qt6) +endif() |