From a55ff722cae338a8fcf5402858c47cf0650a8e5e Mon Sep 17 00:00:00 2001 From: Gangzheng Tong Date: Mon, 30 Jun 2025 12:11:04 -0700 Subject: Reset minimum cmake version to 3.22 (#7548) * Reset minimum cmake version to 3.22 * update slang-rhi --- cmake/SlangTarget.cmake | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'cmake/SlangTarget.cmake') diff --git a/cmake/SlangTarget.cmake b/cmake/SlangTarget.cmake index aa87c16bf..41d77a079 100644 --- a/cmake/SlangTarget.cmake +++ b/cmake/SlangTarget.cmake @@ -414,10 +414,18 @@ function(slang_add_target dir type) # # Link and include from dependencies # - target_link_libraries( - ${target} - PRIVATE $ - ) + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.26") + target_link_libraries( + ${target} + PRIVATE $ + ) + else() + target_link_libraries( + ${target} + PRIVATE $ + ) + endif() + target_link_libraries(${target} PUBLIC ${ARG_LINK_WITH_PUBLIC}) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") @@ -458,10 +466,17 @@ function(slang_add_target dir type) endforeach() foreach(inc ${ARG_INCLUDE_DIRECTORIES_PRIVATE}) get_filename_component(inc_abs ${inc} ABSOLUTE) - target_include_directories( - ${target} - PRIVATE "$" - ) + if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.26") + target_include_directories( + ${target} + PRIVATE "$" + ) + else() + target_include_directories( + ${target} + PRIVATE "$" + ) + endif() endforeach() # -- cgit v1.2.3