Skip to content

Commit 30bb4cc

Browse files
committed
Use standard CMake variables - static/shared lib.
Currently JSONCPP_LIB_BUILD_SHARED variable is used as option to build static/shared libraries. The current patch uses standard CMake variables for this. Such a workaround is done in open-source-parsers#51 Current patch will make it generic.
1 parent 74143f3 commit 30bb4cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ OPTION(JSONCPP_WITH_POST_BUILD_UNITTEST "Automatically run unit-tests as a post
99
OPTION(JSONCPP_WITH_WARNING_AS_ERROR "Force compilation to fail if a warning occurs" OFF)
1010
OPTION(JSONCPP_WITH_PKGCONFIG_SUPPORT "Generate and install .pc files" ON)
1111
OPTION(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" OFF)
12+
OPTION(BUILD_SHARED_LIBS "Build jsoncpp_lib as a shared library." OFF)
13+
OPTION(BUILD_STATIC_LIBS "Build jsoncpp_lib static library." ON)
1214

1315
# Ensures that CMAKE_BUILD_TYPE is visible in cmake-gui on Unix
1416
IF(NOT WIN32)

0 commit comments

Comments
 (0)