Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH] cmake: make sure yaml is built statically when used in tarantool
@ 2019-07-22 21:47 Serge Petrenko
  2019-07-23  8:29 ` [tarantool-patches] " Alexander Turenko
  2019-07-24 12:02 ` Kirill Yukhin
  0 siblings, 2 replies; 3+ messages in thread
From: Serge Petrenko @ 2019-07-22 21:47 UTC (permalink / raw)
  To: alexander.turenko; +Cc: tarantool-patches, 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
-    $<$<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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tarantool-patches] Re: [PATCH] cmake: make sure yaml is built statically when used in tarantool
  2019-07-22 21:47 [tarantool-patches] [PATCH] cmake: make sure yaml is built statically when used in tarantool Serge Petrenko
@ 2019-07-23  8:29 ` Alexander Turenko
  2019-07-24 12:02 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Turenko @ 2019-07-23  8:29 UTC (permalink / raw)
  To: Serge Petrenko; +Cc: tarantool-patches, Kirill Yukhin

I don't have objections. LGTM.

Kirill, please, proceed.

WBR, Alexander Turenko.

On Tue, Jul 23, 2019 at 12:47:09AM +0300, Serge Petrenko wrote:
> 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)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tarantool-patches] Re: [PATCH] cmake: make sure yaml is built statically when used in tarantool
  2019-07-22 21:47 [tarantool-patches] [PATCH] cmake: make sure yaml is built statically when used in tarantool Serge Petrenko
  2019-07-23  8:29 ` [tarantool-patches] " Alexander Turenko
@ 2019-07-24 12:02 ` Kirill Yukhin
  1 sibling, 0 replies; 3+ messages in thread
From: Kirill Yukhin @ 2019-07-24 12:02 UTC (permalink / raw)
  To: tarantool-patches; +Cc: alexander.turenko, Serge Petrenko

Hello,

On 23 Jul 00:47, Serge Petrenko wrote:
> Follow-up tarantool/tarantool#4090
> ---
> https://github.com/tarantool/libyaml/tree/sp/static-linking
> https://github.com/tarantool/tarantool/issues/4090

I've checked your patch into tarantool's libyaml repo and
bumped new version in master.

--
Regards, Kirill Yukhin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-24 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-22 21:47 [tarantool-patches] [PATCH] cmake: make sure yaml is built statically when used in tarantool Serge Petrenko
2019-07-23  8:29 ` [tarantool-patches] " Alexander Turenko
2019-07-24 12:02 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox