Allow custom OpenSSL lib, only include openssl/x509v3.h when used. (#143)

* Allow custom OpenSSL lib, only include openssl/x509v3.h when used.

Using fnmatch on Unix systems, PathMatchSpecA is the best WINAPI equivalent.

* Moved shlwapi into WIN32 block.
This commit is contained in:
Matthew Albrecht
2020-01-08 15:57:57 -06:00
committed by Benjamin Sergeant
parent 1320e4ddaf
commit b816f1fbda
3 changed files with 16 additions and 4 deletions

View File

@ -158,7 +158,7 @@ if (APPLE AND USE_TLS AND NOT USE_MBED_TLS AND NOT USE_OPEN_SSL)
endif()
if (WIN32)
target_link_libraries(ixwebsocket wsock32 ws2_32)
target_link_libraries(ixwebsocket wsock32 ws2_32 shlwapi)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
@ -175,7 +175,9 @@ if (USE_TLS AND USE_OPEN_SSL)
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} /usr/local/opt/openssl/include)
endif()
find_package(OpenSSL REQUIRED)
if(NOT OPENSSL_FOUND)
find_package(OpenSSL REQUIRED)
endif()
add_definitions(${OPENSSL_DEFINITIONS})
message(STATUS "OpenSSL: " ${OPENSSL_VERSION})
include_directories(${OPENSSL_INCLUDE_DIR})