From aa9e44b01f04ce5d4a184b7e874548cfa9a3649d Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 22 Jun 2021 23:37:26 +0300 Subject: [PATCH] MPFRCppThirdparty --- FindMPFRCppThirdparty.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 FindMPFRCppThirdparty.cmake diff --git a/FindMPFRCppThirdparty.cmake b/FindMPFRCppThirdparty.cmake new file mode 100644 index 0000000..0b14e38 --- /dev/null +++ b/FindMPFRCppThirdparty.cmake @@ -0,0 +1,16 @@ +# Подключение внешних проектов +include(ExternalProject) + +if(MPFR_FOUND) + ExternalProject_Add( + mpfrcpp + SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty/mpreal + INSTALL_DIR ${CMAKE_BINARY_DIR}/include + DOWNLOAD_COMMAND "" + CONFIGURE_COMMAND "" + BUILD_COMMAND true + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy /mpreal.h ) +endif() + +set(MPFRCPP_PREFIX ${CMAKE_BINARY_DIR} CACHE FILEPATH "" FORCE) +set(MPFRCPP_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "" FORCE)