From 9a7389839ae93ea7a9440fab8275a449ca2bf9cd Mon Sep 17 00:00:00 2001 From: ae2f Date: Sun, 21 Sep 2025 18:33:16 +0900 Subject: [PATCH 1/3] Made target_include_directories works on install scenario Changes to be committed: modified: CMakeLists.txt --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c496725..d2a352a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,12 @@ add_library(c89atomic STATIC c89atomic.h ) -target_include_directories(c89atomic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( + c89atomic + INTERFACE + $ + $ + ) target_link_libraries (c89atomic PRIVATE c89atomic_common) From bdef566a5e2dfa63e3efa18015e22e47b1e7ca44 Mon Sep 17 00:00:00 2001 From: dalmurii <> Date: Tue, 10 Feb 2026 10:39:54 +0900 Subject: [PATCH 2/3] Removing library [atomic] fetch when host is [UNIX] but target environment is not native. (for now, CGWIN, MINGW, ...) Changes to be committed: - modified: CMakeLists.txt --- CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d2a352a..c2cd3c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,10 +91,15 @@ endif() set(COMMON_LINK_LIBRARIES) if (UNIX) - find_library(LIB_ATOMIC NAMES atomic) - if(LIB_ATOMIC) - list(APPEND COMMON_LINK_LIBRARIES ${LIB_ATOMIC}) - endif() + # pure + if(NOT MINGW AND NOT MSYS AND NOT CYGWIN) + find_library(LIB_ATOMIC NAMES atomic) + if(LIB_ATOMIC) + list(APPEND COMMON_LINK_LIBRARIES ${LIB_ATOMIC}) + endif() + else() + + endif() endif() From 9727be747116eea21a211bf803cf4dde00eedb5e Mon Sep 17 00:00:00 2001 From: dalmurii <> Date: Tue, 10 Feb 2026 10:43:55 +0900 Subject: [PATCH 3/3] UPDATE: made target_include_directories PUBLIC from INTERFACE since c89atomics may use its header. Changes to be committed: - modified: CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2cd3c2..031ffae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,7 @@ add_library(c89atomic STATIC target_include_directories( c89atomic - INTERFACE + PUBLIC $ $ )