FindCainlib.cmake 528 Bytes
FIND_PATH(CAINLIBINCLUDE_DIR cainlib.hh
  HINTS
    ${USERLOCAL_ROOT}/include
  NO_DEFAULT_PATH
)
mark_as_advanced(CAINLIBINCLUDE_DIR)

find_library(CAINLIBLIBRARY 
    NAMES cainlib
    HINTS
      ${USERLOCAL_ROOT}/lib
    NO_DEFAULT_PATH
)
mark_as_advanced(CAINLIBLIBRARY)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cainlib DEFAULT_MSG CAINLIBLIBRARY CAINLIBINCLUDE_DIR)

if(CAINLIB_FOUND)
    set(CAINLIBINCLUDE_DIRS ${CAINLIBINCLUDE_DIR})
    set(CAINLIBLIBRARIES ${CAINLIBLIBRARY})
endif()