… and a working example would help too!
if(PROJECT_IS_TOP_LEVEL)
include(GNUInstallDirs) # for CMAKE_INSTALL_INCLUDEDIR
set(CMAKE_VERIFY_INTERFACE_HEADER_SETS ON)
endif()
# ---- Declare library ----
file(GLOB headers "include/asio/*.hpp")
add_library(asio INTERFACE ${headers})
add_library(asio::asio ALIAS asio)
set_target_properties(asio PROPERTIES INTERFACE_HEADER_SETS_TO_VERIFY ${headers} )
# TODO(CK): this results in this cmake error!
# following header sets that are nonexistent or not INTERFACE:
#
# /Users/clausklein/Workspace/cpp/asio/asio/include/asio/any_io_executor.hpp
#