FIND_PACKAGE(Java)
FIND_PACKAGE(JNI)
IF (JNI_FOUND AND JAVA_FOUND)
  MESSAGE(STATUS "")
  MESSAGE(STATUS "JAVA Setup:")
  MESSAGE(STATUS "----------")
  MESSAGE(STATUS "Path to javac    : " ${Java_JAVAC_EXECUTABLE})
  MESSAGE(STATUS "Path to javadoc  : " ${Java_JAVADOC_EXECUTABLE})
  MESSAGE(STATUS "Path to jar      : " ${Java_JAR_EXECUTABLE})
  MESSAGE(STATUS "")
  MESSAGE(STATUS "JNI Setup:")
  MESSAGE(STATUS "----------")
  MESSAGE(STATUS "Path to jni.h    : " ${JAVA_INCLUDE_PATH})
  MESSAGE(STATUS "Path to jni_md.h : " ${JAVA_INCLUDE_PATH2})
  ADD_SUBDIRECTORY(src/bindings/java)
ENDIF ()
#
# Perl sub-dir is entirely relying on the dzil command
#
INCLUDE(FindPerl)
IF (PERL_FOUND)
  FIND_PROGRAM(DZIL dzil)
  IF (DZIL)
    MESSAGE(STATUS "")
    MESSAGE(STATUS "PERL Packaging will be done with dzil command")
    ADD_SUBDIRECTORY(src/bindings/perl)
  ENDIF ()
ELSE ()
  MESSAGE(STATUS "")
  MESSAGE(STATUS "PERL Packaging must be done with dzil command, please run cpan Dist::Zilla")
ENDIF ()

MESSAGE(STATUS "")

