Commit 7a438151 authored by jan.koester's avatar jan.koester
Browse files

posix plattforms now linking pthread

parent 3208c5df
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@ find_package(libnetplus REQUIRED)
find_package(libcmdplus REQUIRED)
find_package(MbedTLS REQUIRED)

find_package(htmlpp)

SET(CMAKE_CXX_FLAGS "-fPIC -Wall")

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}  ${CMAKE_SOURCE_DIR}/cmake/)
+7 −7
Original line number Diff line number Diff line
@@ -9,19 +9,19 @@ if(BUILD_EXAMPLES AND ${htmlpp_FOUND})
        ${htmlpp_INCLUDE_DIRS}
    )
    add_executable (httpcon httpcon.cpp)
    target_link_libraries(httpcon httppp-static htmlpp-static)
    target_link_libraries(httpcon httppp-static htmlpp::htmlpp-static)
    add_executable (httpform httpform.cpp)
    target_link_libraries(httpform httppp-static htmlpp-static)
    target_link_libraries(httpform httppp-static htmlpp::htmlpp-static)
    add_executable (httpsysinfo httpsysinfo.cpp)
    target_link_libraries(httpsysinfo httppp-static htmlpp-static)
    target_link_libraries(httpsysinfo httppp-static htmlpp::htmlpp-static)
    add_executable (httpcookie httpcookie.cpp)
    target_link_libraries(httpcookie httppp-static htmlpp-static)
    target_link_libraries(httpcookie httppp-static htmlpp::htmlpp-static)
    add_executable (httpauth httpauth.cpp)
    target_link_libraries(httpauth httppp-static htmlpp-static)
    target_link_libraries(httpauth httppp-static htmlpp::htmlpp-static)
    add_executable (httpproxy httpproxy.cpp)
    target_link_libraries(httpproxy httppp-static htmlpp-static)
    target_link_libraries(httpproxy httppp-static htmlpp::htmlpp-static)
    add_executable (httphello httphello.cpp)
    target_link_libraries(httphello httppp-static htmlpp-static)
    target_link_libraries(httphello httppp-static htmlpp::htmlpp-static)
endif()

add_executable (httpclient httpclient.cpp)
+7 −2
Original line number Diff line number Diff line
@@ -22,8 +22,13 @@ add_library(httppp-static STATIC ${libhttpSrcs} )

generate_export_header(httppp)

target_link_libraries(httppp MbedTLS::mbedcrypto netplus cmdplus)
target_link_libraries(httppp-static MbedTLS::mbedcrypto netplus cmdplus)
if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
  target_link_libraries(httppp MbedTLS::mbedcrypto netplus::netplus cmdplus::cmdplus)
  target_link_libraries(httppp-static MbedTLS::mbedcrypto netplus::netplus cmdplus::cmdplus)
else()
  target_link_libraries(httppp MbedTLS::mbedcrypto netplus::netplus cmdplus::cmdplus pthread)
  target_link_libraries(httppp-static MbedTLS::mbedcrypto netplus::netplus cmdplus::cmdplus pthread)
endif()

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