find_path(CXX_PRETTYPRINT_INCLUDE_DIR
    NAMES prettyprint.hpp
    PATHS ${CXX_PRETTYPRINT_INCLUDE_DIRS}
)

mark_as_advanced(CXX_PRETTYPRINT_FOUND CXX_PRETTYPRINT_INCLUDE_DIR)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CXX_PRETTYPRINT
    REQUIRED_VARS CXX_PRETTYPRINT_INCLUDE_DIR
)

if(NOT CXX_PRETTYPRINT_FOUND)
    message(FATAL_ERROR)
endif()

if(CXX_PRETTYPRINT_FOUND AND NOT TARGET CXX_PRETTYPRINT::CXX_PRETTYPRINT)
    add_library(CXX_PRETTYPRINT::CXX_PRETTYPRINT INTERFACE IMPORTED)
    set_target_properties(CXX_PRETTYPRINT::CXX_PRETTYPRINT PROPERTIES
        INTERFACE_INCLUDE_DIRECTORIES "${CXX_PRETTYPRINT_INCLUDE_DIR}"
    )
endif()
