Skip to content
Snippets Groups Projects
Verified Commit d5cc7038 authored by Joe Donofry's avatar Joe Donofry
Browse files

Allow mtxclient to be built as a static library

parent 39fc89a2
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ option(BUILD_LIB_TESTS "Build tests" ON)
option(BUILD_LIB_EXAMPLES "Build examples" ON)
option(COVERAGE "Calculate test coverage" OFF)
option(IWYU "Check headers with include-what-you-use" OFF)
option(MTX_STATIC "Specifies whether to build mtxclient as a static lib or not" OFF)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 14)
......@@ -107,7 +108,12 @@ set_package_properties(Boost PROPERTIES
TYPE REQUIRED
)
add_library(matrix_client SHARED
set(LINK_TYPE SHARED)
if(MTX_STATIC)
set(LINK_TYPE STATIC)
endif(MTX_STATIC)
add_library(matrix_client ${LINK_TYPE}
lib/http/client.cpp
lib/http/session.cpp
lib/crypto/client.cpp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment