Skip to content

Commit

Permalink
🔧 [CMakeLists.txt] Find OpenSSL package
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Feb 5, 2025
1 parent 6fad248 commit 0696c78
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ include(FetchContent)
# Make sure we link the static version
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(BUILD_STATIC_LIBS ON CACHE BOOL "" FORCE)
set(OPENSSL_USE_STATIC_LIBS ON CACHE BOOL "" FORCE)

# spawn_process
add_subdirectory(lib/spawn_process)
Expand Down Expand Up @@ -70,6 +69,17 @@ if(WIN32)
target_sources(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/Coollab-Launcher.manifest")
endif()

# OpenSSL
set(OPENSSL_USE_STATIC_LIBS TRUE)

find_package(OpenSSL 3)

if(NOT OpenSSL_FOUND)
find_package(OpenSSL 1.1.1 REQUIRED)
endif()

target_link_libraries(Coollab-Launcher-Properties INTERFACE OpenSSL::SSL OpenSSL::Crypto)

# cpp-httplib
set(HTTPLIB_REQUIRE_OPENSSL ON CACHE BOOL "" FORCE)
add_subdirectory(Lab/lib/cpp-httplib)
Expand Down

0 comments on commit 0696c78

Please sign in to comment.