diff options
Diffstat (limited to 'cmake/FindLibO3000.cmake')
-rw-r--r-- | cmake/FindLibO3000.cmake | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cmake/FindLibO3000.cmake b/cmake/FindLibO3000.cmake new file mode 100644 index 0000000..154ff9c --- /dev/null +++ b/cmake/FindLibO3000.cmake @@ -0,0 +1,29 @@ +# - Try to find libo3000 +# Once done, this will define +# +# LIB3000_FOUND - system has O-3000 library +# LIB3000_INCLUDE_DIRS - the O-3000 include directories +# LIB3000_LIBRARIES - link these to use libo3000 + +include(LibFindMacros) + +# Use pkg-config to get hints about paths +libfind_pkg_check_modules(LIBO3000_PKGCONF libo3000) + +# Include dir +find_path(LIBO3000_INCLUDE_DIR + NAMES o3000/o3000.h o3000/o3000_portable.h o3000/image_header.h + PATHS ${LIBO3000_PKGCONF_INCLUDE_DIRS} +) + +# Finally the library itself +find_library(LIBO3000_LIBRARY + NAMES o3000 + PATHS ${LIBO3000_PKGCONF_LIBRARY_DIRS} +) + +# Set the include dir variables and the libraries and let libfind_process do the rest. +# NOTE: Singular variables for this library, plural for libraries this this lib depends on. +set(LIBO3000_PROCESS_INCLUDES LIBO3000_INCLUDE_DIR) +set(LIBO3000_PROCESS_LIBS LIBO3000_LIBRARY) +libfind_process(LIBO3000) |