Skip to content

Commit 8819a86

Browse files
committed
Fixing cmake scripts to find gcrypt instead of libcrypto
1 parent 70cd56d commit 8819a86

File tree

3 files changed

+28
-49
lines changed

3 files changed

+28
-49
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ SET(GLIB2_INCLUDE_DIRS $ENV{WIRESHARK_INCLUDE_DIRS})
5151
ENDIF()
5252
include_directories (${WIRESHARK_INCLUDE_DIRS})
5353

54-
IF(NOT DEFINED CRYPTO_INCLUDE_DIR)
55-
find_package(Crypto)
54+
IF(NOT DEFINED GCRYPT_INCLUDE_DIR)
55+
find_package(Gcrypt)
5656
ELSE()
57-
SET(GLIB2_INCLUDE_DIRS $ENV{CRYPTO_INCLUDE_DIR})
57+
SET(GLIB2_INCLUDE_DIRS $ENV{GCRYPT_INCLUDE_DIR})
5858
ENDIF()
59-
include_directories (${CRYPTO_INCLUDE_DIR})
59+
include_directories (${GCRYPT_INCLUDE_DIR})
6060

6161
set(LINK_MODE_LIB SHARED)
6262
set(LINK_MODE_MODULE MODULE)
@@ -101,7 +101,7 @@ set_target_properties(whatsapp PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
101101
IF(DEFINED MANUAL_LINK)
102102
target_link_libraries(whatsapp)
103103
ELSE()
104-
target_link_libraries(whatsapp crypto)
104+
target_link_libraries(whatsapp gcrypt)
105105
ENDIF()
106106

107107
install(TARGETS whatsapp

cmake/FindCrypto.cmake

Lines changed: 0 additions & 44 deletions
This file was deleted.

cmake/FindGcrypt.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (C) 2011 Felix Geyer <debfx@fobos.de>
2+
#
3+
# This program is free software: you can redistribute it and/or modify
4+
# it under the terms of the GNU General Public License as published by
5+
# the Free Software Foundation, either version 2 or (at your option)
6+
# version 3 of the License.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
# You should have received a copy of the GNU General Public License
14+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+
find_path(GCRYPT_INCLUDE_DIR gcrypt.h)
17+
18+
find_library(GCRYPT_LIBRARIES gcrypt)
19+
20+
include(FindPackageHandleStandardArgs)
21+
find_package_handle_standard_args(Gcrypt DEFAULT_MSG GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
22+
23+
mark_as_advanced(GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)

0 commit comments

Comments
 (0)