Skip to content

Commit 3a5b5cc

Browse files
committed
Fixing build
1 parent 446c291 commit 3a5b5cc

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ endif()
336336
set(FPHSA_NAME_MISMATCHED 1) # Suppress warnings, see https://cmake.org/cmake/help/v3.17/module/FindPackageHandleStandardArgs.html
337337
find_package(GMP REQUIRED)
338338
find_package(MPFR REQUIRED)
339-
find_package(FINT REQUIRED)
339+
find_package(FLINT REQUIRED)
340340
MESSAGE(STATUS "MPFR include dir: ${MPFR_INCLUDE_DIR}")
341341
MESSAGE(STATUS "MPFR lib dir: ${MPFR_LIBRARIES}")
342342

cmake/LibFindMacros.cmake

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Taken from symengine
2+
3+
# Macros for finding external libraries
4+
#
5+
# Example usage:
6+
#
7+
# include(LibFindMacros)
8+
# libfind_include(gmpxx.h gmp)
9+
# libfind_library(gmpxx gmp)
10+
# libfind_library(gmp gmp)
11+
# set(GMP_LIBRARIES ${GMPXX_LIBRARY} ${GMP_LIBRARY})
12+
# set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
13+
# include(FindPackageHandleStandardArgs)
14+
# find_package_handle_standard_args(GMP DEFAULT_MSG GMP_LIBRARIES
15+
# GMP_INCLUDE_DIRS)
16+
# mark_as_advanced(GMP_INCLUDE_DIR GMPXX_LIBRARY GMP_LIBRARY)
17+
#
18+
# The result of the Find*.cmake (e.g. FindGMP.cmake) module should be two
19+
# variables GMP_LIBRARIES and GMP_INCLUDE_DIRS, that the user then uses in the
20+
# following way:
21+
#
22+
# find_package(GMP REQUIRED)
23+
# include_directories(${GMP_INCLUDE_DIRS})
24+
# set(LIBS ${LIBS} ${GMP_LIBRARIES})
25+
# # LIBS is later used in target_link_libraries()
26+
27+
function (libfind_library libname pkg)
28+
string(TOUPPER ${pkg} PKG)
29+
string(TOUPPER ${libname} LIBNAME)
30+
31+
find_library(${LIBNAME}_LIBRARY
32+
NAMES
33+
${libname}
34+
)
35+
36+
if (NOT TARGET ${libname})
37+
add_library(${libname} UNKNOWN IMPORTED)
38+
set_property(TARGET ${libname} PROPERTY IMPORTED_LOCATION ${${LIBNAME}_LIBRARY})
39+
endif()
40+
endfunction()
41+
42+
function (libfind_include HEADER pkg)
43+
string(TOUPPER ${pkg} PKG)
44+
45+
find_path(${PKG}_INCLUDE_DIR
46+
NAMES
47+
${HEADER}
48+
)
49+
endfunction()

0 commit comments

Comments
 (0)