cmake-find/FindPreprocmath.cmake

30 lines
917 B
CMake
Raw Normal View History

2021-06-23 05:28:12 +00:00
if(NOT LIBPREPROCMATH_IS_EXTERNAL_PROJECT)
set(LIBPREPROCMATH_PREFIX "" CACHE PATH "The path to the prefix of an libpreprocmath installation")
2021-06-22 22:17:57 +00:00
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()