Skip to content

Commit

Permalink
Don't use unique variable for postfix
Browse files Browse the repository at this point in the history
The more general CMake way to handle library suffixing is to set
CMAKE_<CONFIG>_POSTFIX, so setting the Debug output suffix name should
be more correctly done by the caller or CMake configurer by setting
the desired value in CMAKE_DEBUG_POSTFIX.
  • Loading branch information
mrjoel committed Apr 28, 2020
1 parent 2cb16b3 commit a3afd74
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ endif()
# Adhere to GNU filesystem layout conventions
include(GNUInstallDirs)

set(DEBUG_LIBNAME_SUFFIX "" CACHE STRING "Optional suffix to append to the library name for a debug build")

set(JSONCPP_USE_SECURE_MEMORY "0" CACHE STRING "-D...=1 to use memory-wiping allocator for STL")

configure_file("${PROJECT_SOURCE_DIR}/version.in"
Expand Down
3 changes: 1 addition & 2 deletions src/lib_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ endif()

add_library(jsoncpp_lib ${PUBLIC_HEADERS} ${jsoncpp_sources})
set_target_properties(jsoncpp_lib PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION})
set_target_properties(jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp
DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX})
set_target_properties(jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp)
set_target_properties(jsoncpp_lib PROPERTIES POSITION_INDEPENDENT_CODE ON)

# Set library's runtime search path on OSX
Expand Down

0 comments on commit a3afd74

Please sign in to comment.