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)