Skip to content

Commit 51e0f24

Browse files
committed
fix JSON_DLL definition
1 parent 84a752b commit 51e0f24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/jsontestrunner/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ ADD_EXECUTABLE(jsontestrunner_exe
55
)
66

77
IF(BUILD_SHARED_LIBS)
8-
ADD_DEFINITIONS( -DJSON_DLL )
98
TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib)
9+
SET_TARGET_PROPERTIES(jsontestrunner_exe PROPERTIES COMPILE_DEFINITIONS JSON_DLL)
1010
ELSE(BUILD_SHARED_LIBS)
1111
TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib_static)
1212
ENDIF()

src/test_lib_json/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ ADD_EXECUTABLE( jsoncpp_test
88

99

1010
IF(BUILD_SHARED_LIBS)
11-
ADD_DEFINITIONS( -DJSON_DLL )
1211
TARGET_LINK_LIBRARIES(jsoncpp_test jsoncpp_lib)
12+
SET_TARGET_PROPERTIES(jsoncpp_test PROPERTIES COMPILE_DEFINITIONS JSON_DLL)
1313
ELSE(BUILD_SHARED_LIBS)
1414
TARGET_LINK_LIBRARIES(jsoncpp_test jsoncpp_lib_static)
1515
ENDIF()

0 commit comments

Comments
 (0)