Skip to content

Commit

Permalink
Fix CMake compile when OpenSSL is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimSoderberg committed Jan 21, 2014
1 parent 43ffcf6 commit e423d42
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -688,19 +688,21 @@ if (NOT EVENT__DISABLE_SAMPLES)
dns-example
event-read-fifo
hello-world
le-proxy
signal-test
http-server
time-test)

if (OPENSSL_LIBRARIES)
if (NOT EVENT__DISABLE_OPENSSL AND OPENSSL_LIBRARIES)
# Special sample with more than one file.
add_executable(https-client
sample/https-client.c
sample/openssl_hostname_validation.c
sample/hostcheck.c)
target_link_libraries(https-client event ${LIB_APPS} ${LIB_PLATFORM})
add_dependencies(https-client event)

# Requires OpenSSL.
list(APPEND SAMPLES le-proxy)
endif()

foreach(SAMPLE ${SAMPLES})
Expand Down Expand Up @@ -1026,7 +1028,7 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/LibeventConfigVersion.cmake.in

# Define the public headers.
set_target_properties(event event_core event_extras
PROPERTIES PUBLIC_HEADER ${HDR_PUBLIC})
PROPERTIES PUBLIC_HEADER "${HDR_PUBLIC}")

#
# Install targets.
Expand Down

0 comments on commit e423d42

Please sign in to comment.