mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 15:16:47 +02:00
BUG: New CMake features used that break backward compatibility
We desire for jsoncpp to compile and be readily available with older versions of cmake. The use of newer cmake commands requires conditional statements so that older strategies can be used with older versions of cmake. Resolves: #1018
This commit is contained in:

committed by
Hans Johnson

parent
bdacfd7bc0
commit
aebc7faa4f
@@ -10,7 +10,11 @@ add_executable( jsoncpp_test
|
||||
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
|
||||
add_compile_definitions( JSON_DLL )
|
||||
else()
|
||||
add_definitions( -DJSON_DLL )
|
||||
endif()
|
||||
endif()
|
||||
target_link_libraries(jsoncpp_test jsoncpp_lib)
|
||||
|
||||
|
Reference in New Issue
Block a user