From b50d311b66ec0a7f7122767a8363c896805c2df6 Mon Sep 17 00:00:00 2001 From: Lukas Lipp <15105596+fknfilewalker@users.noreply.github.com> Date: Fri, 16 Feb 2024 06:15:18 +0100 Subject: cmake: option to build a static library version of slang (#3578) * cmake: slang lib type setting * cmake: change name for slang lib type setting --------- Co-authored-by: Yong He --- cmake/SlangTarget.cmake | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmake') diff --git a/cmake/SlangTarget.cmake b/cmake/SlangTarget.cmake index 44d6c945c..cb4443d0e 100644 --- a/cmake/SlangTarget.cmake +++ b/cmake/SlangTarget.cmake @@ -241,6 +241,13 @@ function(slang_add_target dir type) PUBLIC "${ARG_EXPORT_MACRO_PREFIX}_DYNAMIC" PRIVATE "${ARG_EXPORT_MACRO_PREFIX}_DYNAMIC_EXPORT" ) + elseif( + target_type STREQUAL STATIC_LIBRARY + ) + target_compile_definitions( + ${target} + PUBLIC "${ARG_EXPORT_MACRO_PREFIX}_STATIC" + ) endif() endif() -- cgit v1.2.3