Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ option(CppRestAPI_JsonPagination "JSON-aware Link-header pagination strategy (re
option(CppRestAPI_GitHub "GitHub API helpers (ConnectionBuilder, Request). Implies CppRestAPI_JsonPagination." ON)
option(CppRestAPI_Tests "Enable CppRestAPI tests. Forces all backends to be ON" OFF)
option(CppRestAPI_Examples "Build CppRestAPI examples. Forces all backends to be ON" OFF)
option(CppRestAPI_BuildShared "Build CppRestAPI as shared library if ON" ${CMAKE_SHARED_LIBS})

if(CppRestAPI_Tests OR CppRestAPI_Examples)
set(CppRestAPI_QtBackend ON)
Expand Down
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ configure_file(
@ONLY
)

add_library(cpp_restapi version.cpp)
if(CppRestAPI_BuildShared)
add_library(cpp_restapi SHARED)
else()
add_library(cpp_restapi STATIC)
endif()

target_include_directories(cpp_restapi
PUBLIC
Expand All @@ -32,6 +36,7 @@ target_sources(cpp_restapi PRIVATE
header_utils.cpp
threaded_connection.cpp
sse_parser.cpp
version.cpp
)

if(CppRestAPI_QtBackend)
Expand Down
Loading