cmake-find/FindIonobase.cmake
2021-06-23 02:11:10 +03:00

30 lines
873 B
CMake

if(NOT LIBIONOBASE_PREFIX STREQUAL CMAKE_BINARY_DIR)
set(LIBIONOBASE_PREFIX "" CACHE PATH "The path to the previx of an libionobase installation")
find_path(
LIBIONOBASE_INCLUDE_DIRS
NAMES preprocmath/params.hpp
PATHS ${LIBIONOBASE_PREFIX}/include)
find_library(
LIBIONOBASE_LIBRARY
NAMES preprocmath
PATHS ${LIBIONOBASE_PREFIX}/lib)
if(LIBIONOBASE_INCLUDE_DIRS AND LIBIONOBASE_LIBRARY)
get_filename_component(LIBIONOBASE_LIBRARY_DIR ${LIBIONOBASE_LIBRARY}
DIRECTORY CACHE)
set(LIBIONOBASE_FOUND TRUE)
endif()
if(LIBIONOBASE_FOUND)
if(NOT LIBIONOBASE_FIND_QUIETLY)
message(STATUS "Found libionobase")
endif()
set(HAVE_LIBIONOBASE 1)
elseif(LIBIONOBASE_FOUND)
if(LIBIONOBASE_FIND_REQUIRED)
message(FATAL_ERROR "Could not find libionobase")
endif()
endif()
endif()