This repository has been archived by the owner on Oct 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MPIR: use correctly packaged version
- Loading branch information
Showing
2 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
ExternalProject_Add(mpir | ||
PREFIX ${CMAKE_SOURCE_DIR}/deps | ||
DOWNLOAD_NAME mpir-master.tar.gz | ||
DOWNLOAD_NAME mpir-cmake.tar.gz | ||
DOWNLOAD_NO_PROGRESS TRUE | ||
URL https://github.com/chfast/mpir/archive/master.tar.gz | ||
URL_HASH SHA256=ed52442ab345c9dbb463d9c4bee4436785dd6a3ab6d24e461302dd3f93bedbb4 | ||
URL https://github.com/chfast/mpir/archive/cmake.tar.gz | ||
URL_HASH SHA256=2bf35ad7aa2b61bf4c2dcdab9aab48b2b4f9d6db8b937be4b0b5fe3b5efbdfa6 | ||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_BUILD_TYPE=Debug | ||
-DMPIR_GMP=On | ||
) | ||
|
||
ExternalProject_Get_Property(mpir INSTALL_DIR) | ||
add_library(MPIR::mpz STATIC IMPORTED) | ||
set(MPIR_LIBRARY ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}mpz${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
add_library(MPIR::mpir STATIC IMPORTED) | ||
set(MPIR_LIBRARY ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}mpir${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
set(MPIR_INCLUDE_DIR ${INSTALL_DIR}/include) | ||
set_property(TARGET MPIR::mpz PROPERTY IMPORTED_LOCATION ${MPIR_LIBRARY}) | ||
set_property(TARGET MPIR::mpz PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MPIR_INCLUDE_DIR}) | ||
add_dependencies(MPIR::mpz mpir) | ||
set_property(TARGET MPIR::mpir PROPERTY IMPORTED_LOCATION ${MPIR_LIBRARY}) | ||
set_property(TARGET MPIR::mpir PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MPIR_INCLUDE_DIR}) | ||
add_dependencies(MPIR::mpir mpir) | ||
unset(INSTALL_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters