myx-cmake/MyxCMake/find/FindMPFRCppThirdparty.cmake

17 lines
590 B
CMake
Raw Permalink Normal View History

2021-12-08 11:32:04 +00:00
# Подключение внешних проектов
include(ExternalProject)
if(MPFR_FOUND AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/thirdparty/mpreal)
2021-12-08 11:32:04 +00:00
ExternalProject_Add(
mpfrcpp
SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/mpreal
INSTALL_DIR ${CMAKE_BINARY_DIR}/include
CONFIGURE_COMMAND true
BUILD_COMMAND true
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy <SOURCE_DIR>/mpreal.h <INSTALL_DIR>)
set(MPFRCPP_PREFIX ${CMAKE_BINARY_DIR} CACHE FILEPATH "" FORCE)
set(MPFRCPP_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "" FORCE)
2021-12-08 11:32:04 +00:00
endif()