From 6f935907053a6f2cc97b1fafed4a6896d40f6874 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 7 Apr 2015 17:49:10 -0300 Subject: Add FindLibdivecomputer.cmake Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- cmake/Modules/FindLibdivecomputer.cmake | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 cmake/Modules/FindLibdivecomputer.cmake (limited to 'cmake/Modules') diff --git a/cmake/Modules/FindLibdivecomputer.cmake b/cmake/Modules/FindLibdivecomputer.cmake new file mode 100644 index 000000000..07e36f21f --- /dev/null +++ b/cmake/Modules/FindLibdivecomputer.cmake @@ -0,0 +1,35 @@ +# - Try to find the LIBDIVECOMPUTER Library +# Once done this will define +# +# LIBDIVECOMPUTER_FOUND - system has LIBDIVECOMPUTER +# LIBDIVECOMPUTER_INCLUDE_DIR - the LIBDIVECOMPUTER include directory +# LIBDIVECOMPUTER_LIBRARIES +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +# in cache already +IF ( LIBDIVECOMPUTER_INCLUDE_DIR AND LIBDIVECOMPUTER_LIBRARIES ) + SET( LIBDIVECOMPUTER_FIND_QUIETLY TRUE ) +ENDIF ( LIBDIVECOMPUTER_INCLUDE_DIR AND LIBDIVECOMPUTER_LIBRARIES ) + +FIND_PATH( LIBDIVECOMPUTER_INCLUDE_DIR +NAMES libdivecomputer/hw.h +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../libdivecomputer/include/ + /usr/local/include + /usr/include +) + +FIND_LIBRARY( LIBDIVECOMPUTER_LIBRARIES +NAMES + libdivecomputer.a + divecomputer +HINTS + ${CMAKE_CURRENT_SOURCE_DIR}/../libdivecomputer/src/.libs/ + /usr/local/include + /usr/include +) + +INCLUDE( FindPackageHandleStandardArgs ) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( Libdivecomputer DEFAULT_MSG LIBDIVECOMPUTER_INCLUDE_DIR LIBDIVECOMPUTER_LIBRARIES ) -- cgit v1.2.3-70-g09d2