1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Add Find Cmake files for libhogweed and libgmp required by nettle

This commit is contained in:
Prasenjit Kumar Shaw 2019-07-03 15:25:13 +05:30
parent 71cfce5b1f
commit ce174e7f21
4 changed files with 37 additions and 0 deletions

View File

@ -91,6 +91,12 @@ find_package(OpenSSL REQUIRED)
# Mandatory: Nettle # Mandatory: Nettle
find_package(Nettle REQUIRED) find_package(Nettle REQUIRED)
# Mandatory: Hogweed
find_package(Hogweed REQUIRED)
# Mandatory: GMP
find_package(GMP REQUIRED)
# Mandatory: KF5 # Mandatory: KF5
find_package(KF5 REQUIRED COMPONENTS Archive) find_package(KF5 REQUIRED COMPONENTS Archive)

16
cmake/FindGMP.cmake Normal file
View File

@ -0,0 +1,16 @@
if (GMP_INCLUDE_DIR AND GMP_LIBRARY)
set(GMP_FIND_QUIETLY TRUE)
endif (GMP_INCLUDE_DIR AND GMP_LIBRARY)
find_path(GMP_INCLUDE_DIR NAMES gmp.h
PATHS $ENV{GMPDIR} ${INCLUDE_INSTALL_DIR}
)
find_library(GMP_LIBRARY gmp
PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP DEFAULT_MSG
GMP_INCLUDE_DIR GMP_LIBRARY)
mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARY)

12
cmake/FindHogweed.cmake Normal file
View File

@ -0,0 +1,12 @@
if (HOGWEED_LIBRARY)
set(HOGWEED_FIND_QUIETLY TRUE)
endif (HOGWEED_LIBRARY)
find_library(HOGWEED_LIBRARY hogweed
PATHS $ENV{HOGWEEDDIR} ${LIB_INSTALL_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HOGWEED DEFAULT_MSG
HOGWEED_LIBRARY)
mark_as_advanced(HOGWEED_LIBRARY)

View File

@ -41,6 +41,7 @@ include_directories(
include_directories(${OPENSSL_INCLUDE_DIR}) include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${NETTLE_INCLUDE_DIR}) include_directories(${NETTLE_INCLUDE_DIR})
include_directories(${GMP_INCLUDE_DIR})
set(SRCS ${SRCS} set(SRCS ${SRCS}
3rdparty/fancytabwidget.cpp 3rdparty/fancytabwidget.cpp
@ -360,6 +361,8 @@ target_link_libraries(FalkonPrivate
KF5::Archive KF5::Archive
${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}
${NETTLE_LIBRARY} ${NETTLE_LIBRARY}
${GMP_LIBRARY}
${HOGWEED_LIBRARY}
) )
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)