Blame view

cmake/modules/FindArchive.cmake 982 Bytes
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
# - Try to find the libarchive libraries
# Once done this will define
#
# libarchive_FOUND - flag that indicates libarchive is installed
# libarchive_INCLUDE_DIR - the libarchive include directory
# libarchive_LIBRARIES - the libarchive library directory

ab9d7e65   Benjamin Renard   Fix libraries loc...
8
9
FIND_PATH(libarchive_INCLUDE_DIR archive.h PATHS ${USERLOCAL_ROOT}/include /usr/include NO_DEFAULT_PATH)
FIND_LIBRARY(libarchive_LIBRARIES NAMES archive PATHS ${USERLOCAL_ROOT}/lib /usr/lib NO_DEFAULT_PATH)
fbe3c2bb   Benjamin Renard   First commit
10
11
12
13
14
15
16
17
18
19
20
21
22

# set FOUND flag
IF(libarchive_INCLUDE_DIR AND libarchive_LIBRARIES)
	SET(libarchive_FOUND 1)
	if(NOT libarchive_FIND_QUIETLY)
		message(STATUS "Found libarchive: ${libarchive_LIBRARIES}")
	endif(NOT libarchive_FIND_QUIETLY)
ELSE(libarchive_INCLUDE_DIR AND libarchive_LIBRARIES)
	SET(libarchive_FOUND 0 CACHE BOOL "Not found libarchive library")
	message(STATUS "NOT Found libarchive, disabling it")
ENDIF(libarchive_INCLUDE_DIR AND libarchive_LIBRARIES)

MARK_AS_ADVANCED(libarchive_INCLUDE_DIR libarchive_LIBRARIES)