Skip to content

Commit ba67be2

Browse files
OpenSSL is always required
1 parent 38abd54 commit ba67be2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ target_link_libraries(countly Threads::Threads)
3333

3434
target_include_directories(countly PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/vendor/json/include)
3535

36+
if (APPLE)
37+
set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
38+
endif()
39+
find_package(OpenSSL REQUIRED)
40+
target_include_directories(countly PRIVATE ${OPENSSL_INCLUDE_DIR})
41+
target_link_libraries(countly ${OPENSSL_LIBRARIES})
42+
3643
if(COUNTLY_USE_CUSTOM_HTTP)
3744
target_compile_definitions(countly PRIVATE COUNTLY_USE_CUSTOM_HTTP)
3845
elseif(NOT WIN32)
@@ -47,12 +54,6 @@ if(COUNTLY_USE_SQLITE)
4754
find_package(Sqlite3)
4855
target_include_directories(countly PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/vendor/sqlite)
4956
target_link_libraries(countly sqlite3)
50-
if (APPLE)
51-
set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
52-
endif()
53-
find_package(OpenSSL REQUIRED)
54-
target_include_directories(countly PRIVATE ${OPENSSL_INCLUDE_DIRS})
55-
target_link_libraries(countly ${OPENSSL_LIBRARIES})
5657
endif()
5758

5859
if(COUNTLY_BUILD_TESTS)

0 commit comments

Comments
 (0)