Skip to content

Commit 8661100

Browse files
committed
Include mpir on windows
1 parent 726dd06 commit 8661100

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/CMakeLists.txt

+13
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ set(CMAKE_MODULE_PATH
1818
find_package(GMP REQUIRED)
1919
find_package(GMPXX REQUIRED)
2020

21+
if(WIN32)
22+
set(MPIR_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mpir_gc_x64")
23+
set(MPIR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mpir_gc_x64")
24+
include_directories(${MPIR_INCLUDE_DIR})
25+
find_library(MPIR_LIBRARY NAMES mpir PATHS ${MPIR_LIBRARY_DIR} NO_DEFAULT_PATH)
26+
if(MPIR_LIBRARY)
27+
message(STATUS "MPIR library found at ${MPIR_LIBRARY}")
28+
link_libraries(${MPIR_LIBRARY})
29+
else()
30+
message(FATAL_ERROR "MPIR library not found")
31+
endif()
32+
endif()
33+
2134
include_directories(
2235
${INCLUDE_DIRECTORIES}
2336
${CMAKE_CURRENT_SOURCE_DIR}

0 commit comments

Comments
 (0)