Skip to content

Commit

Permalink
Use CMake's OpenSSL package
Browse files Browse the repository at this point in the history
  • Loading branch information
RockinRoel committed May 6, 2019
1 parent f341814 commit d1c74ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ INCLUDE(cmake/WtFindBoost.txt)
INCLUDE(cmake/WtFindFcgi.txt)
INCLUDE(cmake/WtFindZlib.txt)
INCLUDE(cmake/WtFindPng.txt)
INCLUDE(cmake/WtFindSsl.txt)
INCLUDE(cmake/WtFindMysql.txt)
INCLUDE(cmake/WtFindPostgresql.txt)
INCLUDE(cmake/WtFindOdbc.txt)
Expand All @@ -335,6 +334,9 @@ INCLUDE(cmake/WtFindGm.txt)
INCLUDE(cmake/WtFindGL.txt)
INCLUDE(cmake/WtFindSkia.txt)

set(OPENSSL_ROOT_DIR ${SSL_PREFIX})
find_package(OpenSSL)

IF (ENABLE_UNWIND)
INCLUDE(cmake/WtFindUnwind.txt)
ENDIF (ENABLE_UNWIND)
Expand Down Expand Up @@ -595,10 +597,10 @@ IF(ENABLE_HARU AND HARU_FOUND)
SET(WT_HAS_WPDFIMAGE true)
ENDIF(ENABLE_HARU AND HARU_FOUND)

IF(ENABLE_SSL AND SSL_FOUND)
IF(ENABLE_SSL AND OPENSSL_FOUND)
SET(HAVE_SSL ON)
SET(WT_WITH_SSL true)
ENDIF(ENABLE_SSL AND SSL_FOUND)
ENDIF(ENABLE_SSL AND OPENSSL_FOUND)

IF(ENABLE_PANGO AND PANGO_FT2_FOUND)
SET(HAVE_PANGO ON)
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,8 @@ ELSE(ENABLE_LIBWTTEST)
ENDIF(ENABLE_LIBWTTEST)

IF(HAVE_SSL)
TARGET_LINK_LIBRARIES(wt PRIVATE ${SSL_LIBRARIES})
INCLUDE_DIRECTORIES(${SSL_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(wt PRIVATE ${OPENSSL_LIBRARIES})
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
IF(WIN32)
TARGET_LINK_LIBRARIES(wt PRIVATE Crypt32.lib)
ENDIF(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion src/fcgi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IF(CONNECTOR_FCGI)
TARGET_LINK_LIBRARIES(wtfcgi PUBLIC wt PRIVATE ${FCGI_LIB} ${FCGIPP_LIB})

IF(WT_WITH_SSL)
TARGET_LINK_LIBRARIES(wtfcgi PRIVATE ${SSL_LIBRARIES})
TARGET_LINK_LIBRARIES(wtfcgi PRIVATE ${OPENSSL_LIBRARIES})
ENDIF(WT_WITH_SSL)

IF(MULTI_THREADED_BUILD)
Expand Down
2 changes: 1 addition & 1 deletion src/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ IF(CONNECTOR_HTTP)
ENDIF(WIN32)

IF (HAVE_SSL)
SET(MY_SSL_LIBS ${SSL_LIBRARIES})
SET(MY_SSL_LIBS ${OPENSSL_LIBRARIES})
ADD_DEFINITIONS(-DHTTP_WITH_SSL)
ELSE (HAVE_SSL)
SET(MY_SSL_LIBS "")
Expand Down

0 comments on commit d1c74ac

Please sign in to comment.