Skip to content

Commit

Permalink
cmake: find openssl with cmake module
Browse files Browse the repository at this point in the history
Simplifies with imported targets.

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Nov 16, 2024
1 parent 8ddfb85 commit bd6ab7f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,8 @@ target_include_directories(httping PUBLIC ${FFTW3_INCLUDE_DIRS})
target_compile_options(httping PUBLIC ${FFTW3_CFLAGS_OTHER})
endif ()

pkg_check_modules(SSL libssl)
target_link_libraries(httping ${SSL_LIBRARIES})
target_include_directories(httping PUBLIC ${SSL_INCLUDE_DIRS})
target_compile_options(httping PUBLIC ${SSL_CFLAGS_OTHER})

pkg_check_modules(OPENSSL openssl)
target_link_libraries(httping ${OPENSSL_LIBRARIES})
target_include_directories(httping PUBLIC ${OPENSSL_INCLUDE_DIRS})
target_compile_options(httping PUBLIC ${OPENSSL_CFLAGS_OTHER})
find_package(OpenSSL REQUIRED)
target_link_libraries(httping OpenSSL::SSL OpenSSL::Crypto)

include(GNUInstallDirs)

Expand Down

0 comments on commit bd6ab7f

Please sign in to comment.