# Optional Linux-side integration tests.
#
# These helpers are not built by default because they depend on the host
# ncpfs/libncp development files and on a running NetWare-compatible server.

find_path(NCPFS_INCLUDE_DIR
    NAMES ncp/nwcalls.h ncp/ncplib.h
)

find_library(NCPFS_LIBRARY
    NAMES ncp
)

if(NOT NCPFS_INCLUDE_DIR OR NOT NCPFS_LIBRARY)
    message(FATAL_ERROR
        "MARS_NWE_BUILD_LINUX_TESTS requires ncpfs/libncp headers and libncp. "
        "Install the ncpfs development package or disable MARS_NWE_BUILD_LINUX_TESTS."
    )
endif()

add_executable(afp_entry_id_smoke afp_entry_id_smoke.c)
target_include_directories(afp_entry_id_smoke PRIVATE ${NCPFS_INCLUDE_DIR})
target_link_libraries(afp_entry_id_smoke ${NCPFS_LIBRARY})
