Skip to content

Commit 27639ce

Browse files
committed
Add support for BUILD_SHARED_LIBS argument
BUILD_SHARED_LIBS is a standard CMake argument that serves the purpose of the custom JSONCPP_LIB_BUILD_SHARED. For now we force JSONCPP_LIB_BUILD_SHARED to true if BUILD_SHARED_LIBS was defined. Workaround for #51.
1 parent f8a3a59 commit 27639ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib_json/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
OPTION(JSONCPP_LIB_BUILD_SHARED "Build jsoncpp_lib as a shared library." OFF)
2+
IF(BUILD_SHARED_LIBS)
3+
SET(JSONCPP_LIB_BUILD_SHARED ON)
4+
ENDIF(BUILD_SHARED_LIBS)
5+
26
IF(JSONCPP_LIB_BUILD_SHARED)
37
SET(JSONCPP_LIB_TYPE SHARED)
48
ADD_DEFINITIONS( -DJSON_DLL_BUILD )

0 commit comments

Comments
 (0)