# - Try to find the libarchive libraries # Once done this will define # # libarchive_FOUND - flag that indicates libarchive is installed # libarchive_INCLUDE_DIR - the libarchive include directory # libarchive_LIBRARIES - the libarchive library directory FIND_PATH(libarchive_INCLUDE_DIR archive.h PATHS /include /usr/include /usr/local/include ${USERLOCAL_ROOT}/include) FIND_LIBRARY(libarchive_LIBRARIES NAMES archive PATHS /lib /usr/lib /usr/local/lib ${USERLOCAL_ROOT}/lib ) # set FOUND flag IF(libarchive_INCLUDE_DIR AND libarchive_LIBRARIES) SET(libarchive_FOUND 1) if(NOT libarchive_FIND_QUIETLY) message(STATUS "Found libarchive: ${libarchive_LIBRARIES}") endif(NOT libarchive_FIND_QUIETLY) ELSE(libarchive_INCLUDE_DIR AND libarchive_LIBRARIES) SET(libarchive_FOUND 0 CACHE BOOL "Not found libarchive library") message(STATUS "NOT Found libarchive, disabling it") ENDIF(libarchive_INCLUDE_DIR AND libarchive_LIBRARIES) MARK_AS_ADVANCED(libarchive_INCLUDE_DIR libarchive_LIBRARIES)