Skip to content

Commit

Permalink
Avoid import/static libs name clash
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Jul 13, 2017
1 parent f45c01a commit ffdcc93
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ ENDIF()
IF(BUILD_STATIC_LIBS)
ADD_LIBRARY(jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources})
SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION})
SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp
DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
# avoid name clashes on windows as the shared import lib is also named jsoncpp.lib
if (NOT DEFINED STATIC_SUFFIX AND BUILD_SHARED_LIBS)
set (STATIC_SUFFIX "_static")
endif ()
set_target_properties (jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp${STATIC_SUFFIX}
DEBUG_OUTPUT_NAME jsoncpp${STATIC_SUFFIX}${DEBUG_LIBNAME_SUFFIX})

INSTALL( TARGETS jsoncpp_lib_static ${INSTALL_EXPORT}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand Down

0 comments on commit ffdcc93

Please sign in to comment.