From 92d5f8eae1539fcacf5e5769f284a8de9ff99b9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20B=C3=B6ger?= <mail@lboeger.de>
Date: Mon, 31 May 2021 07:30:48 +0100
Subject: [PATCH] apply static flag for bootstrap exec, too

This is required for the Windows configuration to succeed at all. It
should also be beneficial when we start sharing object code between
bootstrap and actual executable.
---
 CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90cf38e3..c02b5b82 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,10 @@ endif()
 add_library(libchibi-common
     INTERFACE)
 
+if (NOT BUILD_SHARED_LIBS)
+    target_compile_definitions(libchibi-common INTERFACE SEXP_STATIC_LIBRARY=1)
+endif()
+
 target_include_directories(libchibi-common
     INTERFACE
     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
@@ -137,10 +141,6 @@ set_target_properties(libchibi-scheme
     SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR}
     VERSION ${CMAKE_PROJECT_VERSION})
 
-if (NOT BUILD_SHARED_LIBS)
-    target_compile_definitions(libchibi-scheme PUBLIC SEXP_STATIC_LIBRARY=1)
-endif()
-
 
 #
 # Generate modules