From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0B27124613 for ; Mon, 22 Jul 2019 17:47:26 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PEpwwf99eWVI for ; Mon, 22 Jul 2019 17:47:25 -0400 (EDT) Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 6D9D6240EA for ; Mon, 22 Jul 2019 17:47:25 -0400 (EDT) From: Serge Petrenko Subject: [tarantool-patches] [PATCH] cmake: make sure yaml is built statically when used in tarantool Date: Tue, 23 Jul 2019 00:47:09 +0300 Message-Id: <20190722214709.48100-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: alexander.turenko@tarantool.org Cc: tarantool-patches@freelists.org, Serge Petrenko 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 - $<$>:YAML_DECLARE_STATIC> + $<$>,$>:YAML_DECLARE_STATIC> $<$:_CRT_SECURE_NO_WARNINGS> ) -- 2.20.1 (Apple Git-117)