From 30259841d69a9dab20e4ccf49638e7d294b8af1c Mon Sep 17 00:00:00 2001 From: Alexander Penev <7923188+alexander-penev@users.noreply.github.com> Date: Thu, 21 Mar 2024 23:17:55 +0200 Subject: [PATCH] Add LLVM version info to CPPINTEROP_LLVM_* variables (#214) --- cmake/CppInterOp/CppInterOpConfig.cmake.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/CppInterOp/CppInterOpConfig.cmake.in b/cmake/CppInterOp/CppInterOpConfig.cmake.in index b2dd5a53b..abb88569c 100644 --- a/cmake/CppInterOp/CppInterOpConfig.cmake.in +++ b/cmake/CppInterOp/CppInterOpConfig.cmake.in @@ -19,7 +19,7 @@ endif() if (@BUILD_SHARED_LIBS@) set(_lib_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX}) set(_lib_prefix ${CMAKE_SHARED_LIBRARY_PREFIX}) -else() +else() set(_lib_suffix ${CMAKE_STATIC_LIBRARY_SUFFIX}) set(_lib_prefix ${CMAKE_STATIC_LIBRARY_PREFIX}) endif() @@ -39,10 +39,17 @@ set(CPPINTEROP_CMAKE_DIR "${_cmake}") set(CPPINTEROP_INCLUDE_DIRS "${_include}") set(CPPINTEROP_LIBRARIES "${_lib}") +set(CPPINTEROP_LLVM_VERSION "@LLVM_VERSION@") +set(CPPINTEROP_LLVM_VERSION_MAJOR "@LLVM_VERSION_MAJOR@") +set(CPPINTEROP_LLVM_VERSION_MINOR "@LLVM_VERSION_MINOR@") +set(CPPINTEROP_LLVM_VERSION_PATCH "@LLVM_VERSION_PATCH@") +set(CPPINTEROP_LLVM_VERSION_SUFFIX "@LLVM_VERSION_SUFFIX@") +set(CPPINTEROP_LLVM_PACKAGE_VERSION "@PACKAGE_VERSION@") + # Provide all our library targets to users. if (@BUILD_SHARED_LIBS@) add_library(clangCppInterOp SHARED IMPORTED) -else() +else() add_library(clangCppInterOp STATIC IMPORTED) endif() set_target_properties(clangCppInterOp PROPERTIES