Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
have cmake find OpenSSL (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 authored Oct 14, 2018
1 parent c522792 commit d3f7fe7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
3 changes: 2 additions & 1 deletion source/glest_game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ IF(BUILD_ZETAGLEST)
ENDIF()

IF(WANT_USE_OpenSSL)
FIND_PACKAGE(OpenSSL)
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl)
include(FindOpenSSL)
IF(OPENSSL_FOUND)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
ELSE()
Expand Down
22 changes: 9 additions & 13 deletions source/shared_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,21 @@ IF(BUILD_MODEL_VIEWER OR BUILD_MAP_EDITOR OR BUILD_ZETAGLEST)
ENDIF()

IF(WANT_USE_OpenSSL)
FIND_PACKAGE(OpenSSL)
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl)
include(FindOpenSSL)
IF(OPENSSL_FOUND)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${OPENSSL_LIBRARIES})
ELSE()
MESSAGE(STATUS "**NOTE: OpenSSL is usually not required.")
MESSAGE(STATUS "**NOTE: OpenSSL is usually not required.")
ENDIF()
ENDIF()

include(FindCURL)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
IF(UNIX)
IF(NOT OPENSSL_FOUND)
# default
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES})
ELSE()
# mageia
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
ENDIF()
ENDIF()
if(CURL_FOUND)
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${CURL_LIBRARIES})
endif()

FIND_PACKAGE(${SDL_VERSION_NAME} REQUIRED)
INCLUDE_DIRECTORIES(${${SDL_VERSION_NAME}_INCLUDE_DIR})
Expand Down

0 comments on commit d3f7fe7

Please sign in to comment.