30 lines
930 B
CMake
30 lines
930 B
CMake
|
if(NOT LIBPREPROCMATH_PREFIX STREQUAL CMAKE_BINARY_DIR)
|
||
|
set(LIBPREPROCMATH_PREFIX "" CACHE PATH "The path to the previx of an libpreprocmath installation")
|
||
|
|
||
|
find_path(
|
||
|
LIBPREPROCMATH_INCLUDE_DIRS
|
||
|
NAMES preprocmath/params.hpp
|
||
|
PATHS ${LIBPREPROCMATH_PREFIX}/include)
|
||
|
find_library(
|
||
|
LIBPREPROCMATH_LIBRARY
|
||
|
NAMES preprocmath
|
||
|
PATHS ${LIBPREPROCMATH_PREFIX}/lib)
|
||
|
|
||
|
if(LIBPREPROCMATH_INCLUDE_DIRS AND LIBPREPROCMATH_LIBRARY)
|
||
|
get_filename_component(LIBPREPROCMATH_LIBRARY_DIR ${LIBPREPROCMATH_LIBRARY}
|
||
|
DIRECTORY CACHE)
|
||
|
set(LIBPREPROCMATH_FOUND TRUE)
|
||
|
endif()
|
||
|
|
||
|
if(LIBPREPROCMATH_FOUND)
|
||
|
if(NOT LIBPREPROCMATH_FIND_QUIETLY)
|
||
|
message(STATUS "Found libpreprocmath")
|
||
|
endif()
|
||
|
set(HAVE_LIBPREPROCMATH 1)
|
||
|
elseif(LIBPREPROCMATH_FOUND)
|
||
|
if(LIBPREPROCMATH_FIND_REQUIRED)
|
||
|
message(FATAL_ERROR "Could not find libpreprocmath")
|
||
|
endif()
|
||
|
endif()
|
||
|
endif()
|