From e3355e2942a112ca9e7a6f5ec7d0bd7787339417 Mon Sep 17 00:00:00 2001 From: Matthew McCall Date: Fri, 27 Mar 2026 16:07:05 -0400 Subject: [PATCH] Add conditional library type for RARE based on Oasis target --- src/CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 432baf7..f1d7a84 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,16 @@ -add_library(RARE) +if (WIN32 AND TARGET Oasis::Oasis) + get_target_property(_oasis_type Oasis::Oasis TYPE) + + if (_oasis_type STREQUAL "SHARED_LIBRARY") + add_library(RARE SHARED) + elseif (_oasis_type STREQUAL "STATIC_LIBRARY") + add_library(RARE STATIC) + else () + add_library(RARE) + endif () +else () + add_library(RARE) +endif () target_sources(RARE PUBLIC FILE_SET rare_sources