Исправление поиска каталогов (закончено)

This commit is contained in:
Andrei Astafev 2021-06-29 12:56:20 +03:00
parent 9f85f524e8
commit 4ffa65694c
2 changed files with 8 additions and 9 deletions

View File

@ -10,14 +10,13 @@
set(MPFR_PREFIX "" CACHE PATH "The path to the prefix of an MPFR installation")
find_path(MPFR_INCLUDE_DIR mpfr.h
find_path(MPFR_INCLUDE_DIRS mpfr.h
PATHS ${MPFR_PREFIX}/include)
find_library(MPFR_LIBRARIES NAMES mpfr
PATHS ${MPFR_PREFIX}/lib)
if(MPFR_INCLUDE_DIR AND MPFR_LIBRARIES)
get_filename_component(MPFR_LIBRARY_DIR ${MPFR_LIBRARIES} PATH)
if(MPFR_INCLUDE_DIRS AND MPFR_LIBRARIES)
set(MPFR_FOUND TRUE)
endif()

View File

@ -4,11 +4,11 @@ if(NOT PREPROC_IS_EXTERNAL_PROJECT)
set(PREPROC_LIBRARY_DIR "" CACHE PATH "The path to the library of an libpreproc installation")
set(_search_paths "")
if(EXISTS PREPROC_INCLUDE_DIR)
if(PREPROC_INCLUDE_DIR AND EXISTS ${PREPROC_INCLUDE_DIR})
list(APPEND _search_paths ${PREPROC_INCLUDE_DIR})
endif()
if(EXISTS PREPROC_PREFIX)
list(APPEND _search_paths ${PREPROC_PREFIX}/include)
if(PREPROC_PREFIX AND EXISTS ${PREPROC_PREFIX})
list(APPEND _search_paths "${PREPROC_PREFIX}/include")
endif()
find_path(
PREPROC_INCLUDE_DIRS
@ -16,11 +16,11 @@ if(NOT PREPROC_IS_EXTERNAL_PROJECT)
PATHS ${_search_paths})
set(_search_paths "")
if(EXISTS PREPROC_LIBRARY_DIR)
if(PREPROC_LIBRARY_DIR AND EXISTS ${PREPROC_LIBRARY_DIR})
list(APPEND _search_paths ${PREPROC_LIBRARY_DIR})
endif()
if(EXISTS PREPROC_PREFIX)
list(APPEND _search_paths ${PREPROC_PREFIX}/lib)
if(PREPROC_PREFIX AND EXISTS ${PREPROC_PREFIX})
list(APPEND _search_paths "${PREPROC_PREFIX}/lib")
endif()
find_library(
PREPROC_LIBRARIES