Skip to content

Commit

Permalink
Add LLVM version info to CPPINTEROP_LLVM_* variables (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-penev authored Mar 21, 2024
1 parent 88fd586 commit 3025984
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmake/CppInterOp/CppInterOpConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 3025984

Please sign in to comment.