1# Find the IOWOW headers and libraries, attemting to import IOWOW exported targets, 2# 3# IOWOW_INCLUDE_DIRS - The IOWOW include directory 4# IOWOW_LIBRARIES - The libraries needed to use IOWOW 5# IOWOW_FOUND - True if IOWOW found in system 6 7find_path(IOWOW_INCLUDE_DIR NAMES iowow/iowow.h) 8mark_as_advanced(IOWOW_INCLUDE_DIR) 9find_library(IOWOW_LIBRARY NAMES 10 iowow 11 libiowow 12 iowowlib 13) 14mark_as_advanced(IOWOW_LIBRARY) 15include(FindPackageHandleStandardArgs) 16find_package_handle_standard_args(IOWOW DEFAULT_MSG IOWOW_LIBRARY IOWOW_INCLUDE_DIR) 17 18if(IOWOW_FOUND) 19 set(IOWOW_LIBRARIES ${IOWOW_LIBRARY}) 20 set(IOWOW_INCLUDE_DIRS ${IOWOW_INCLUDE_DIR}) 21 find_path(IOWOW_EXPORTS_DIR 22 NAMES "iowow/iowow-exports.cmake" 23 PATHS /usr/share /usr/local/share) 24 mark_as_advanced(IOWOW_EXPORTS_DIR) 25 if(IOWOW_EXPORTS_DIR) 26 if(EXISTS ${IOWOW_EXPORTS_DIR}/iowow/iowow-exports.cmake) 27 include(${IOWOW_EXPORTS_DIR}/iowow/iowow-exports.cmake) 28 message("-- Imported ${IOWOW_EXPORTS_DIR}/iowow/iowow-exports.cmake") 29 endif() 30 if(EXISTS ${IOWOW_EXPORTS_DIR}/iowow/iowow-static-exports.cmake) 31 include(${IOWOW_EXPORTS_DIR}/iowow/iowow-static-exports.cmake) 32 message("-- Imported ${IOWOW_EXPORTS_DIR}/iowow/iowow-static-exports.cmake") 33 endif() 34 endif(IOWOW_EXPORTS_DIR) 35elseif(IOWOW_FIND_REQUIRED) 36 message(FATAL_ERROR "Could not find libiowow.") 37endif(IOWOW_FOUND) 38 39 40