30 lines
844 B
CMake
30 lines
844 B
CMake
|
if(NOT LIBPREPROC_PREFIX STREQUAL CMAKE_BINARY_DIR)
|
||
|
set(LIBPREPROC_PREFIX "" CACHE PATH "The path to the previx of an libpreproc installation")
|
||
|
|
||
|
find_path(
|
||
|
LIBPREPROC_INCLUDE_DIRS
|
||
|
NAMES preproc/mark.hpp
|
||
|
PATHS ${LIBPREPROC_PREFIX}/include)
|
||
|
find_library(
|
||
|
LIBPREPROC_LIBRARY
|
||
|
NAMES preproc
|
||
|
PATHS ${LIBPREPROC_PREFIX}/lib)
|
||
|
|
||
|
if(LIBPREPROC_INCLUDE_DIRS AND LIBPREPROC_LIBRARY)
|
||
|
get_filename_component(LIBPREPROC_LIBRARY_DIR ${LIBPREPROC_LIBRARY}
|
||
|
DIRECTORY CACHE)
|
||
|
set(LIBPREPROC_FOUND TRUE)
|
||
|
endif()
|
||
|
|
||
|
if(LIBPREPROC_FOUND)
|
||
|
if(NOT LIBPREPROC_FIND_QUIETLY)
|
||
|
message(STATUS "Found libpreproc")
|
||
|
endif()
|
||
|
set(HAVE_LIBPREPROC 1)
|
||
|
elseif(LIBPREPROC_FOUND)
|
||
|
if(LIBPREPROC_FIND_REQUIRED)
|
||
|
message(FATAL_ERROR "Could not find libpreproc")
|
||
|
endif()
|
||
|
endif()
|
||
|
endif()
|