From: Serge Petrenko <sergepetrenko@tarantool.org> To: alexander.turenko@tarantool.org Cc: tarantool-patches@freelists.org, Serge Petrenko <sergepetrenko@tarantool.org> Subject: [tarantool-patches] [PATCH] cmake: make sure yaml is built statically when used in tarantool Date: Tue, 23 Jul 2019 00:47:09 +0300 [thread overview] Message-ID: <20190722214709.48100-1-sergepetrenko@tarantool.org> (raw) Follow-up tarantool/tarantool#4090 --- https://github.com/tarantool/libyaml/tree/sp/static-linking https://github.com/tarantool/tarantool/issues/4090 CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cc8ccf..6d3ed0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,9 +52,13 @@ configure_file( ${config_h} ) -add_library(yaml ${SRCS}) +if(ENABLE_BUNDLED_LIBYAML) + add_library(yaml STATIC ${SRCS}) +else() + add_library(yaml ${SRCS}) +endif() -if(NOT BUILD_SHARED_LIBS) +if(NOT BUILD_SHARED_LIBS OR ENABLE_BUNDLED_LIBYAML) set_target_properties(yaml PROPERTIES OUTPUT_NAME yaml_static ) @@ -67,7 +71,7 @@ set_target_properties(yaml target_compile_definitions(yaml PRIVATE HAVE_CONFIG_H PUBLIC - $<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:YAML_DECLARE_STATIC> + $<$<OR:$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>,$<BOOL:${ENABLE_BUNDLED_LIBYAML}>>:YAML_DECLARE_STATIC> $<$<BOOL:${MSVC}>:_CRT_SECURE_NO_WARNINGS> ) -- 2.20.1 (Apple Git-117)
next reply other threads:[~2019-07-22 21:47 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-22 21:47 Serge Petrenko [this message] 2019-07-23 8:29 ` [tarantool-patches] " Alexander Turenko 2019-07-24 12:02 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190722214709.48100-1-sergepetrenko@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH] cmake: make sure yaml is built statically when used in tarantool' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox