Skip to content

Commit 580a07f

Browse files
committed
build: exposed option to allow building static libs
1 parent 3d31252 commit 580a07f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Release/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@ set(CPPREST_EXCLUDE_BROTLI ON CACHE BOOL "Exclude Brotli compression functionali
2222
set(CPPREST_EXPORT_DIR cmake/cpprestsdk CACHE STRING "Directory to install CMake config files.")
2323
set(CPPREST_INSTALL_HEADERS ON CACHE BOOL "Install header files.")
2424
set(CPPREST_INSTALL ON CACHE BOOL "Add install commands.")
25+
set(CPPREST_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries.")
2526

26-
if(IOS OR ANDROID)
27-
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libraries")
28-
else()
29-
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
30-
endif()
27+
set(BUILD_SHARED_LIBS ${CPPREST_BUILD_SHARED_LIBS})
3128

3229
if(IOS OR ANDROID OR WINDOWS_STORE OR WINDOWS_PHONE)
3330
set(BUILD_TESTS OFF CACHE BOOL "Build tests.")

0 commit comments

Comments
 (0)