Unverified Commit 513ee81f authored by deflinhec's avatar deflinhec Committed by GitHub
Browse files

Make debug postfix optional (#856)

Library debug postfix might not be suitable for cross platform project, and usually require extra work of link against prebuilt yaml-cpp.

Generally, Xcode project output library to these directories:
    Debug
    Release
    Debug-iphoneos
    Release-iphoneos
    Debug-iphonesimulator
    Release-iphonesimulator

Another Xcode project usually configured its build setting as follow, and expects library name to be same between Release and Debug
    LIBRARY_SEARCH_PATHS=$(CONFIGURATION)$(EFFECT_PLATFORM_NAME)
    OTHER_LDFLAGS= $(inherited) -lyaml-cpp
parent 9f2781b5
...@@ -108,12 +108,16 @@ target_sources(yaml-cpp ...@@ -108,12 +108,16 @@ target_sources(yaml-cpp
PRIVATE PRIVATE
$<$<BOOL:${YAML_CPP_BUILD_CONTRIB}>:${yaml-cpp-contrib-sources}> $<$<BOOL:${YAML_CPP_BUILD_CONTRIB}>:${yaml-cpp-contrib-sources}>
${yaml-cpp-sources}) ${yaml-cpp-sources})
if (NOT DEFINED CMAKE_DEBUG_POSTFIX)
set(CMAKE_DEBUG_POSTFIX "d")
endif()
set_target_properties(yaml-cpp PROPERTIES set_target_properties(yaml-cpp PROPERTIES
VERSION "${PROJECT_VERSION}" VERSION "${PROJECT_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
PROJECT_LABEL "yaml-cpp ${yaml-cpp-label-postfix}" PROJECT_LABEL "yaml-cpp ${yaml-cpp-label-postfix}"
DEBUG_POSTFIX d) DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
configure_package_config_file( configure_package_config_file(
"${PROJECT_SOURCE_DIR}/yaml-cpp-config.cmake.in" "${PROJECT_SOURCE_DIR}/yaml-cpp-config.cmake.in"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment