mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	HINTS should be dynamically introspected, static entries should be in PATHS. There is also a platform dependent list of things where CMake always looks if not explicitely forbidden, so remove any entries that are usually in those default lists. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
		
			
				
	
	
		
			39 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
# - 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/device.h
 | 
						|
    libdivecomputer/descriptor.h
 | 
						|
HINTS
 | 
						|
    ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/include
 | 
						|
    ${CMAKE_CURRENT_SOURCE_DIR}/../libdivecomputer/include/
 | 
						|
PATHS
 | 
						|
    /opt/out/include
 | 
						|
)
 | 
						|
 | 
						|
FIND_LIBRARY( LIBDIVECOMPUTER_LIBRARIES
 | 
						|
NAMES
 | 
						|
    libdivecomputer.a
 | 
						|
    divecomputer
 | 
						|
HINTS
 | 
						|
    ${CMAKE_CURRENT_SOURCE_DIR}/../install-root/lib
 | 
						|
    ${CMAKE_CURRENT_SOURCE_DIR}/../libdivecomputer/src/.libs/
 | 
						|
PATHS
 | 
						|
    /opt/out/lib
 | 
						|
)
 | 
						|
 | 
						|
INCLUDE( FindPackageHandleStandardArgs )
 | 
						|
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Libdivecomputer DEFAULT_MSG LIBDIVECOMPUTER_INCLUDE_DIR LIBDIVECOMPUTER_LIBRARIES )
 |