File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,8 +95,12 @@ ENDIF()
9595IF (BUILD_STATIC_LIBS)
9696 ADD_LIBRARY (jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources} )
9797 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 (NOT DEFINED STATIC_SUFFIX AND BUILD_SHARED_LIBS )
100+ set (STATIC_SUFFIX "_static" )
101+ endif ()
102+ set_target_properties (jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp${STATIC_SUFFIX}
103+ DEBUG_OUTPUT_NAME jsoncpp${STATIC_SUFFIX}${DEBUG_LIBNAME_SUFFIX} )
100104
101105 INSTALL ( TARGETS jsoncpp_lib_static ${INSTALL_EXPORT}
102106 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
You can’t perform that action at this time.
0 commit comments