Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix libgcrypt #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions nasl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,26 @@ if (NETSNMP)
endif (NETSNMP)

message (STATUS "Looking for libgcrypt...")
find_library (GCRYPT gcrypt)
pkg_check_modules (GCRYPT REQUIRED libgcrypt)
message (STATUS "Looking for libgcrypt... ${GCRYPT}")
if (NOT GCRYPT)
message (SEND_ERROR "The libgcrypt library is required.")
else (NOT GCRYPT)
execute_process (COMMAND libgcrypt-config --libs
OUTPUT_VARIABLE GCRYPT_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND libgcrypt-config --cflags
OUTPUT_VARIABLE GCRYPT_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND libgcrypt-config --version
OUTPUT_VARIABLE GCRYPT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
message (STATUS " found libgcrypt, version ${GCRYPT_VERSION}")
if (GCRYPT_VERSION VERSION_LESS "1.6")
message (SEND_ERROR "libgcrypt 1.6 or greater is required")
endif (GCRYPT_VERSION VERSION_LESS "1.6")
string(REPLACE "-I" "" GCRYPT_INCLUDE_DIRS "${GCRYPT_CFLAGS}")
endif (NOT GCRYPT)
#if (NOT GCRYPT)
# message (SEND_ERROR "The libgcrypt library is required.")
#else (NOT GCRYPT)
# execute_process (COMMAND libgcrypt-config --libs
# OUTPUT_VARIABLE GCRYPT_LDFLAGS
# OUTPUT_STRIP_TRAILING_WHITESPACE)
# execute_process (COMMAND libgcrypt-config --cflags
# OUTPUT_VARIABLE GCRYPT_CFLAGS
# OUTPUT_STRIP_TRAILING_WHITESPACE)
# execute_process (COMMAND libgcrypt-config --version
# OUTPUT_VARIABLE GCRYPT_VERSION
# OUTPUT_STRIP_TRAILING_WHITESPACE)
# message (STATUS " found libgcrypt, version ${GCRYPT_VERSION}")
# if (GCRYPT_VERSION VERSION_LESS "1.6")
# message (SEND_ERROR "libgcrypt 1.6 or greater is required")
# endif (GCRYPT_VERSION VERSION_LESS "1.6")
# string(REPLACE "-I" "" GCRYPT_INCLUDE_DIRS "${GCRYPT_CFLAGS}")
#endif (NOT GCRYPT)


## Library
Expand Down
40 changes: 20 additions & 20 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ pkg_check_modules (GLIB REQUIRED glib-2.0>=2.42)
pkg_check_modules (LIBBSD REQUIRED libbsd)

message (STATUS "Looking for libgcrypt...")
find_library (GCRYPT gcrypt)
if (NOT GCRYPT)
message (SEND_ERROR "The libgcrypt library is required.")
else (NOT GCRYPT)
message (STATUS "Looking for libgcrypt... ${GCRYPT}")
execute_process (COMMAND libgcrypt-config --libs
OUTPUT_VARIABLE GCRYPT_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND libgcrypt-config --cflags
OUTPUT_VARIABLE GCRYPT_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND libgcrypt-config --version
OUTPUT_VARIABLE GCRYPT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
message (STATUS " found libgcrypt, version ${GCRYPT_VERSION}")
if (GCRYPT_VERSION VERSION_LESS "1.6")
message (SEND_ERROR "libgcrypt 1.6 or greater is required")
endif (GCRYPT_VERSION VERSION_LESS "1.6")
string(REPLACE "-I" "" GCRYPT_INCLUDE_DIRS "${GCRYPT_CFLAGS}")
endif (NOT GCRYPT)
pkg_check_modules (GCRYPT REQUIRED libgcrypt)
#if (NOT GCRYPT)
# message (SEND_ERROR "The libgcrypt library is required.")
#else (NOT GCRYPT)
# message (STATUS "Looking for libgcrypt... ${GCRYPT}")
# execute_process (COMMAND libgcrypt-config --libs
# OUTPUT_VARIABLE GCRYPT_LDFLAGS
# OUTPUT_STRIP_TRAILING_WHITESPACE)
# execute_process (COMMAND libgcrypt-config --cflags
# OUTPUT_VARIABLE GCRYPT_CFLAGS
# OUTPUT_STRIP_TRAILING_WHITESPACE)
# execute_process (COMMAND libgcrypt-config --version
# OUTPUT_VARIABLE GCRYPT_VERSION
# OUTPUT_STRIP_TRAILING_WHITESPACE)
# message (STATUS " found libgcrypt, version ${GCRYPT_VERSION}")
# if (GCRYPT_VERSION VERSION_LESS "1.6")
# message (SEND_ERROR "libgcrypt 1.6 or greater is required")
# endif (GCRYPT_VERSION VERSION_LESS "1.6")
# string(REPLACE "-I" "" GCRYPT_INCLUDE_DIRS "${GCRYPT_CFLAGS}")
#endif (NOT GCRYPT)

message (STATUS "Looking for pcap...")
find_library (PCAP pcap)
Expand Down
Loading