Skip to content

Commit

Permalink
try to improve ssl detection
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Mar 2, 2024
1 parent af76e86 commit e1d3869
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ target_include_directories(liblive555helper PUBLIC ${LIVE}/groupsock/include ${L

if (WIN32)
target_compile_definitions(liblive555helper PUBLIC _CRT_SECURE_NO_WARNINGS=1 NO_GETIFADDRS=1)
target_link_libraries (liblive555helper ws2_32)
target_link_libraries (liblive555helper PUBLIC ws2_32)
elseif (APPLE)
target_compile_definitions(liblive555helper PUBLIC BSD=1 SOCKLEN_T=socklen_t _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE=1 NO_STD_LIB=1 NEED_XLOCALE_H=1)
else ()
Expand All @@ -33,15 +33,15 @@ if (DETECT_OPENSSL)
find_package(OpenSSL QUIET)
endif()
MESSAGE("OpenSSL_FOUND = ${OpenSSL_FOUND}")
if (NOT OpenSSL_FOUND)
if (OpenSSL_FOUND)
target_include_directories(liblive555helper PUBLIC ${OPENSSL_INCLUDE_DIR})
target_link_libraries(liblive555helper PUBLIC ${OPENSSL_LIBRARIES})
else()
target_compile_definitions(liblive555helper PUBLIC NO_OPENSSL=1)
endif()

add_executable (${PROJECT_NAME} main.cpp)
target_link_libraries (${PROJECT_NAME} liblive555helper)
if (OpenSSL_FOUND)
target_link_libraries (${PROJECT_NAME} OpenSSL::SSL OpenSSL::Crypto)
endif()

SET(CPACK_GENERATOR "TGZ")
SET(CPACK_PACKAGE_CONTACT "[email protected]")
Expand Down

0 comments on commit e1d3869

Please sign in to comment.