<commit_before>find_package(OpenSSL REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)

include(GenerateExportHeader)

set(libhttpSrcs
  threadpool.cpp
  exception.cpp
  connections.cpp
  http.cpp
  httpd.cpp
  https.cpp
  base64.cpp
  utils.cpp
)

#os dependencies
IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
  list(APPEND libhttpSrcs "os/windows/socket.cpp")
  list(APPEND libhttpSrcs "os/windows/lock.cpp")
  list(APPEND libhttpSrcs "os/windows/thread.cpp")
  list(APPEND libhttpSrcs "os/windows/sysinfo.cpp")
ELSE()
  list(APPEND libhttpSrcs "os/unix/socket.cpp")
  list(APPEND libhttpSrcs "os/unix/lock.cpp")
  list(APPEND libhttpSrcs "os/unix/thread.cpp")
  list(APPEND libhttpSrcs "os/unix/sysinfo.cpp")
ENDIF()

list(APPEND libhttpSrcs "os/event/event.cpp")


include_directories(
  ${OPENSSL_INCLUDE_DIR}
)

add_library(httppp        SHARED ${libhttpSrcs} )
add_library(httppp-static STATIC ${libhttpSrcs} )

generate_export_header(httppp)

IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
  target_link_libraries(httppp ${OPENSSL_LIBRARIES} wsock32 ws2_32)
  target_link_libraries(httppp-static ${OPENSSL_LIBRARIES} wsock32 ws2_32)
ELSE()
  target_link_libraries(httppp ${OPENSSL_LIBRARIES} pthread)
  target_link_libraries(httppp-static ${OPENSSL_LIBRARIES} pthread)    
ENDIF()

SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")

set_property(TARGET httppp PROPERTY VERSION ${Upstream_VERSION})
set_property(TARGET httppp PROPERTY SOVERSION ${LIBV})
set_property(TARGET httppp PROPERTY INTERFACE_httppp_MAJOR_VERSION ${LIBV})
set_property(TARGET httppp APPEND PROPERTY COMPATIBLE_INTERFACE_STRING httppp_MAJOR_VERSION)<commit_msg>fixed cmake file<commit_after>find_package(OpenSSL REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)

include(GenerateExportHeader)

set(libhttpSrcs
  threadpool.cpp
  exception.cpp
  connections.cpp
  http.cpp
  httpd.cpp
  https.cpp
  base64.cpp
  utils.cpp
)

#os dependencies
IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
  list(APPEND libhttpSrcs "os/windows/socket.cpp")
  list(APPEND libhttpSrcs "os/windows/lock.cpp")
  list(APPEND libhttpSrcs "os/windows/thread.cpp")
  list(APPEND libhttpSrcs "os/windows/sysinfo.cpp")
ELSE()
  list(APPEND libhttpSrcs "os/unix/socket.cpp")
  list(APPEND libhttpSrcs "os/unix/lock.cpp")
  list(APPEND libhttpSrcs "os/unix/thread.cpp")
  list(APPEND libhttpSrcs "os/unix/sysinfo.cpp")
ENDIF()

list(APPEND libhttpSrcs "os/event/event.cpp")

IF(${EVENT} MATCHES "IOCP")
  list(APPEND libhttpSrcs "os/event/iocp/iocp.cpp")
ELSEIF(${EVENT} MATCHES "EPOLL")
  list(APPEND libhttpSrcs "os/event/epoll/epoll.cpp")
ELSEIF(${EVENT} MATCHES "KQUEUE")
  list(APPEND libhttpSrcs "os/event/kqueue/kqueue.cpp")
ENDIF()

include_directories(
  ${OPENSSL_INCLUDE_DIR}
)

add_library(httppp        SHARED ${libhttpSrcs} )
add_library(httppp-static STATIC ${libhttpSrcs} )

generate_export_header(httppp)

IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
  target_link_libraries(httppp ${OPENSSL_LIBRARIES} wsock32 ws2_32)
  target_link_libraries(httppp-static ${OPENSSL_LIBRARIES} wsock32 ws2_32)
ELSE()
  target_link_libraries(httppp ${OPENSSL_LIBRARIES} pthread)
  target_link_libraries(httppp-static ${OPENSSL_LIBRARIES} pthread)    
ENDIF()

SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")

set_property(TARGET httppp PROPERTY VERSION ${Upstream_VERSION})
set_property(TARGET httppp PROPERTY SOVERSION ${LIBV})
set_property(TARGET httppp PROPERTY INTERFACE_httppp_MAJOR_VERSION ${LIBV})
set_property(TARGET httppp APPEND PROPERTY COMPATIBLE_INTERFACE_STRING httppp_MAJOR_VERSION)
{'fraction_non_alphanumeric': 0.1044165757906216, 'fraction_numerical': 0.006543075245365322, 'mean_word_length': 6.873390557939914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3665162', 'n_tokens_mistral': 1473, 'n_tokens_neox': 1404, 'n_words': 234}