File tree Expand file tree Collapse file tree 4 files changed +63
-0
lines changed
scripts/test_ports/vcpkg-ci-llama-cpp Expand file tree Collapse file tree 4 files changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ set (VCPKG_POLICY_EMPTY_PACKAGE enabled)
2
+
3
+ vcpkg_find_acquire_program(PKGCONFIG)
4
+ set (ENV{PKG_CONFIG} "${PKGCONFIG} " )
5
+
6
+ vcpkg_cmake_configure(
7
+ SOURCE_PATH "${CURRENT_PORT_DIR} /project"
8
+ )
9
+ vcpkg_cmake_build()
Original file line number Diff line number Diff line change
1
+ cmake_minimum_required (VERSION 3.16)
2
+ project (whisper-cpp-test )
3
+
4
+ find_package (whisper CONFIG REQUIRED)
5
+
6
+ add_executable (test -cmake main.cxx)
7
+ add_library (imported ::whisper ALIAS whisper)
8
+ target_link_libraries (test -cmake PRIVATE imported ::whisper)
9
+
10
+ find_package (PkgConfig REQUIRED)
11
+ pkg_check_modules(whisper-cpp whisper REQUIRED IMPORTED_TARGET)
12
+
13
+ add_executable (test -pkconfig main.cxx)
14
+ target_link_libraries (test -pkconfig PRIVATE PkgConfig::whisper-cpp)
15
+
16
+ # Vulkan on Android isn't really useful, but the build can succeed.
17
+ if (ANDROID AND TARGET ggml::ggml-vulkan)
18
+ # Instantiates VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
19
+ find_package (Vulkan REQUIRED)
20
+ target_link_libraries (test -cmake PRIVATE Vulkan::Vulkan)
21
+ target_compile_definitions (test -cmake PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1)
22
+ target_link_libraries (test -pkconfig PRIVATE Vulkan::Vulkan)
23
+ target_compile_definitions (test -pkconfig PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1)
24
+ endif ()
Original file line number Diff line number Diff line change
1
+ #include < llama.h>
2
+
3
+ #if defined(VULKAN_HPP_DISPATCH_LOADER_DYNAMIC) && VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
4
+ #include < vulkan/vulkan.hpp>
5
+ VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
6
+ #endif
7
+
8
+ int main ()
9
+ {
10
+ auto context_params = llama_context_default_params ();
11
+ ggml_backend_load_all ();
12
+ return 0 ;
13
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " vcpkg-ci-llama-cpp" ,
3
+ "version-string" : " ci" ,
4
+ "description" : " Port to validate llama-cpp" ,
5
+ "homepage" : " https://github.com/microsoft/vcpkg" ,
6
+ "license" : " MIT" ,
7
+ "dependencies" : [
8
+ {
9
+ "name" : " llama-cpp" ,
10
+ "default-features" : false
11
+ },
12
+ {
13
+ "name" : " vcpkg-cmake" ,
14
+ "host" : true
15
+ }
16
+ ]
17
+ }
You can’t perform that action at this time.
0 commit comments