Skip to content

Commit 4301908

Browse files
ya1gauravcdunn2001
authored andcommitted
Use standard CMake variables - static/shared lib.
Replaced JSONCPP_LIB_BUILD_SHARED => BUILD_SHARED_LIBS Moved flag JSON_DLL to line no 8.
1 parent 0c1c076 commit 4301908

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/jsontestrunner/CMakeLists.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
FIND_PACKAGE(PythonInterp 2.6)
22

3-
IF(JSONCPP_LIB_BUILD_SHARED)
4-
ADD_DEFINITIONS( -DJSON_DLL )
5-
ENDIF(JSONCPP_LIB_BUILD_SHARED)
6-
73
ADD_EXECUTABLE(jsontestrunner_exe
84
main.cpp
95
)
106

11-
IF(JSONCPP_LIB_BUILD_SHARED)
7+
IF(BUILD_SHARED_LIBS)
8+
ADD_DEFINITIONS( -DJSON_DLL )
129
TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib)
13-
ELSE(JSONCPP_LIB_BUILD_SHARED)
10+
ELSE(BUILD_SHARED_LIBS)
1411
TARGET_LINK_LIBRARIES(jsontestrunner_exe jsoncpp_lib_static)
15-
ENDIF(JSONCPP_LIB_BUILD_SHARED)
12+
ENDIF(BUILD_SHARED_LIBS)
1613

1714
SET_TARGET_PROPERTIES(jsontestrunner_exe PROPERTIES OUTPUT_NAME jsontestrunner_exe)
1815

0 commit comments

Comments
 (0)