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.
This commit is contained in:
Rémi Verschelde 2014-12-01 23:47:21 +01:00
parent f8a3a599ac
commit 27639ce578

View File

@ -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 )