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: CMake. Use pkg-config instead of the dropped libgcrypt-config #1694

Merged
merged 1 commit into from
Aug 15, 2024
Merged
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
21 changes: 1 addition & 20 deletions nasl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,7 @@ if (NETSNMP)
endif (NETSNMP)

message (STATUS "Looking for libgcrypt...")
find_library (GCRYPT gcrypt)
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)
pkg_check_modules (GCRYPT REQUIRED libgcrypt)


## Library
Expand Down
21 changes: 1 addition & 20 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,7 @@ 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)

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