set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../common)

add_library(
  keydistribution_client STATIC
  client.cpp
  cert_verify_config.cpp
  ${COMMON_DIR}/verify_callback.cpp)

target_include_directories(
  keydistribution_client
  PUBLIC
    ${SRC_DIR}
    ${COMMON_DIR}
    ${OE_INCLUDEDIR})

target_compile_features(keydistribution_client PUBLIC cxx_std_17)
target_compile_options(keydistribution_client PRIVATE -fPIC)

target_link_libraries(
  keydistribution_client
  keydistribution_common
  OpenSSL::SSL
  OpenSSL::Crypto
  openenclave::oehost
  pthread)
