add defns to static yaml-cpp target (fixes #1116)
This commit is contained in:
parent
c73ee34704
commit
c07e20ce33
@ -46,7 +46,6 @@ if (YAML_BUILD_SHARED_LIBS)
|
|||||||
else()
|
else()
|
||||||
set(yaml-cpp-type STATIC)
|
set(yaml-cpp-type STATIC)
|
||||||
set(yaml-cpp-label-postfix "static")
|
set(yaml-cpp-label-postfix "static")
|
||||||
add_definitions(-DYAML_CPP_STATIC_DEFINE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(build-shared $<BOOL:${YAML_BUILD_SHARED_LIBS}>)
|
set(build-shared $<BOOL:${YAML_BUILD_SHARED_LIBS}>)
|
||||||
@ -123,6 +122,8 @@ target_compile_options(yaml-cpp
|
|||||||
$<$<CXX_COMPILER_ID:MSVC>:/W3 /wd4127 /wd4355>)
|
$<$<CXX_COMPILER_ID:MSVC>:/W3 /wd4127 /wd4355>)
|
||||||
|
|
||||||
target_compile_definitions(yaml-cpp
|
target_compile_definitions(yaml-cpp
|
||||||
|
PUBLIC
|
||||||
|
$<$<NOT:$<BOOL:${YAML_BUILD_SHARED_LIBS}>>:YAML_CPP_STATIC_DEFINE>
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<${build-windows-dll}:${PROJECT_NAME}_DLL>
|
$<${build-windows-dll}:${PROJECT_NAME}_DLL>
|
||||||
$<$<NOT:$<BOOL:${YAML_CPP_BUILD_CONTRIB}>>:YAML_CPP_NO_CONTRIB>)
|
$<$<NOT:$<BOOL:${YAML_CPP_BUILD_CONTRIB}>>:YAML_CPP_NO_CONTRIB>)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user