target llvm19 (need to be upstreamed)
link with static libLLVMcore and libLLVMoption instead of whole libLLVM-NN.so

Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -7,7 +7,7 @@ project(c2ffi)
 set(SOURCE_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
 
 # Apparently the LLVM package doesn't support ranges
-find_package(LLVM 18.1.0 CONFIG)
+find_package(LLVM 19.0.0 CONFIG)
 find_package(Clang REQUIRED CONFIG)
 
 message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
@@ -64,7 +64,11 @@ target_include_directories(c2ffi PUBLIC
   ${LLVM_INCLUDE_DIRS}
   ${SOURCE_ROOT}/src/include
   )
-target_link_libraries(c2ffi PUBLIC clang-cpp LLVM)
+
+llvm_map_components_to_libnames(llvm_libs core option)
+target_link_libraries(c2ffi PRIVATE ${llvm_libs})
+
+target_link_libraries(c2ffi PUBLIC clang-cpp)
 
 set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin")
 set_target_properties(c2ffi PROPERTIES
