diff --git a/CMakeLists.txt b/CMakeLists.txt index afd5409..2361614 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,7 +46,6 @@ if (YAML_BUILD_SHARED_LIBS) else() set(yaml-cpp-type STATIC) set(yaml-cpp-label-postfix "static") - add_definitions(-DYAML_CPP_STATIC_DEFINE) endif() set(build-shared $) @@ -123,6 +122,8 @@ target_compile_options(yaml-cpp $<$:/W3 /wd4127 /wd4355>) target_compile_definitions(yaml-cpp + PUBLIC + $<$>:YAML_CPP_STATIC_DEFINE> PRIVATE $<${build-windows-dll}:${PROJECT_NAME}_DLL> $<$>:YAML_CPP_NO_CONTRIB>)