Skip to content

Commit

Permalink
Added option to build static/dynamic library
Browse files Browse the repository at this point in the history
  • Loading branch information
U0J5748 committed Oct 24, 2022
1 parent 1975b60 commit b2f00d4
Showing 1 changed file with 38 additions and 17 deletions.
55 changes: 38 additions & 17 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,44 @@ set(CURLCPP_HEADER_LIST
../include/curl_utility.h
)

add_library(curlcpp SHARED
curl_easy.cpp
curl_header.cpp
curl_global.cpp
curl_form.cpp
curl_multi.cpp
curl_share.cpp
curl_info.cpp
curl_cookie.cpp
curl_exception.cpp
cookie.cpp
cookie_date.cpp
cookie_time.cpp
cookie_datetime.cpp

${CURLCPP_HEADER_LIST}
)

if(NOT BUILD_SHARED_LIBS)
add_library(curlcpp
curl_easy.cpp
curl_header.cpp
curl_global.cpp
curl_form.cpp
curl_multi.cpp
curl_share.cpp
curl_info.cpp
curl_cookie.cpp
curl_exception.cpp
cookie.cpp
cookie_date.cpp
cookie_time.cpp
cookie_datetime.cpp

${CURLCPP_HEADER_LIST}
)
else()
add_library(curlcpp ${BUILD_SHARED_LIBS}
curl_easy.cpp
curl_header.cpp
curl_global.cpp
curl_form.cpp
curl_multi.cpp
curl_share.cpp
curl_info.cpp
curl_cookie.cpp
curl_exception.cpp
cookie.cpp
cookie_date.cpp
cookie_time.cpp
cookie_datetime.cpp

${CURLCPP_HEADER_LIST}
)
endif()

add_library(curlcpp::curlcpp ALIAS curlcpp)

Expand Down

0 comments on commit b2f00d4

Please sign in to comment.