File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,14 @@ ENDIF()
95
95
IF (BUILD_STATIC_LIBS )
96
96
ADD_LIBRARY (jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources} )
97
97
SET_TARGET_PROPERTIES ( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION} )
98
- SET_TARGET_PROPERTIES ( jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp
99
- DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
98
+ # avoid name clashes on windows as the shared import lib is also named jsoncpp.lib
99
+ if (BUILD_SHARED_LIBS )
100
+ set_target_properties (jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp_static
101
+ DEBUG_OUTPUT_NAME jsoncpp_static${DEBUG_LIBNAME_SUFFIX} )
102
+ else ()
103
+ set_target_properties (jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp
104
+ DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
105
+ endif ()
100
106
101
107
INSTALL ( TARGETS jsoncpp_lib_static ${INSTALL_EXPORT}
102
108
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
You can’t perform that action at this time.
0 commit comments