30 lines
831 B
CMake
30 lines
831 B
CMake
if(NOT LIBPREPROC_IS_EXTERNAL_PROJECT)
|
|
set(LIBPREPROC_PREFIX "" CACHE PATH "The path to the prefix 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()
|