Skip to content

Commit

Permalink
Add support for BUILD_SHARED_LIBS argument
Browse files Browse the repository at this point in the history
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 open-source-parsers#51.
  • Loading branch information
akien-mga committed Dec 1, 2014
1 parent f8a3a59 commit 27639ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib_json/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
OPTION(JSONCPP_LIB_BUILD_SHARED "Build jsoncpp_lib as a shared library." OFF)
IF(BUILD_SHARED_LIBS)
SET(JSONCPP_LIB_BUILD_SHARED ON)
ENDIF(BUILD_SHARED_LIBS)

IF(JSONCPP_LIB_BUILD_SHARED)
SET(JSONCPP_LIB_TYPE SHARED)
ADD_DEFINITIONS( -DJSON_DLL_BUILD )
Expand Down

0 comments on commit 27639ce

Please sign in to comment.