2021-06-29 05:14:16 +00:00
|
|
|
if(NOT IONOBASE_IS_EXTERNAL_PROJECT)
|
|
|
|
set(IONOBASE_PREFIX "" CACHE PATH "The path to the prefix of an libionobase installation")
|
|
|
|
set(IONOBASE_INCLUDE_DIR "" CACHE PATH "The path to the headers of an libionobase installation")
|
|
|
|
set(IONOBASE_LIBRARY_DIR "" CACHE PATH "The path to the library of an libionobase installation")
|
2021-06-22 23:11:10 +00:00
|
|
|
|
2021-06-29 05:14:16 +00:00
|
|
|
set(_search_paths "")
|
2021-06-29 08:23:46 +00:00
|
|
|
if(IONOBASE_INCLUDE_DIR AND EXISTS ${IONOBASE_INCLUDE_DIR})
|
2021-06-29 05:14:16 +00:00
|
|
|
list(APPEND _search_paths ${IONOBASE_INCLUDE_DIR})
|
|
|
|
endif()
|
2021-06-29 08:23:46 +00:00
|
|
|
if(IONOBASE_PREFIX AND EXISTS ${IONOBASE_PREFIX})
|
|
|
|
list(APPEND _search_paths "${IONOBASE_PREFIX}/include")
|
2021-06-29 05:14:16 +00:00
|
|
|
endif()
|
2021-06-22 23:11:10 +00:00
|
|
|
find_path(
|
2021-06-29 05:14:16 +00:00
|
|
|
IONOBASE_INCLUDE_DIRS
|
2021-06-29 08:59:47 +00:00
|
|
|
NAMES ionobase/interchfor.h
|
2021-06-29 05:14:16 +00:00
|
|
|
PATHS ${_search_paths})
|
|
|
|
|
|
|
|
set(_search_paths "")
|
2021-06-29 08:23:46 +00:00
|
|
|
if(IONOBASE_LIBRARY_DIR AND EXISTS ${IONOBASE_LIBRARY_DIR})
|
2021-06-29 05:14:16 +00:00
|
|
|
list(APPEND _search_paths ${IONOBASE_LIBRARY_DIR})
|
|
|
|
endif()
|
2021-06-29 08:23:46 +00:00
|
|
|
if(IONOBASE_PREFIX AND EXISTS ${IONOBASE_PREFIX})
|
|
|
|
list(APPEND _search_paths "${IONOBASE_PREFIX}/lib")
|
2021-06-29 05:14:16 +00:00
|
|
|
endif()
|
2021-06-22 23:11:10 +00:00
|
|
|
find_library(
|
2021-06-29 05:14:16 +00:00
|
|
|
IONOBASE_LIBRARIES
|
2021-06-24 09:03:01 +00:00
|
|
|
NAMES ionobase
|
2021-06-29 05:14:16 +00:00
|
|
|
PATHS ${_search_paths})
|
|
|
|
unset(_search_paths)
|
2021-06-22 23:11:10 +00:00
|
|
|
|
2021-06-29 05:14:16 +00:00
|
|
|
if(IONOBASE_INCLUDE_DIRS AND IONOBASE_LIBRARIES)
|
|
|
|
set(IONOBASE_FOUND TRUE)
|
2021-06-22 23:11:10 +00:00
|
|
|
endif()
|
|
|
|
|
2021-06-29 05:14:16 +00:00
|
|
|
if(IONOBASE_FOUND)
|
|
|
|
if(NOT IONOBASE_FIND_QUIETLY)
|
2021-06-22 23:11:10 +00:00
|
|
|
message(STATUS "Found libionobase")
|
|
|
|
endif()
|
2021-06-29 05:14:16 +00:00
|
|
|
set(HAVE_IONOBASE 1)
|
|
|
|
elseif(IONOBASE_FOUND)
|
|
|
|
if(IONOBASE_FIND_REQUIRED)
|
2021-06-22 23:11:10 +00:00
|
|
|
message(FATAL_ERROR "Could not find libionobase")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|