2023-04-30 12:14:33 +03:00
|
|
|
if (WHISPER_SDL2)
|
2025-01-13 08:55:48 +02:00
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2024-12-21 09:43:49 +02:00
|
|
|
set(TARGET whisper-talk-llama)
|
2024-08-08 14:16:50 +03:00
|
|
|
add_executable(${TARGET} talk-llama.cpp
|
|
|
|
llama.cpp
|
2025-01-13 08:55:48 +02:00
|
|
|
llama-adapter.cpp
|
|
|
|
llama-arch.cpp
|
|
|
|
llama-batch.cpp
|
|
|
|
llama-chat.cpp
|
|
|
|
llama-context.cpp
|
|
|
|
llama-cparams.cpp
|
2024-08-08 14:16:50 +03:00
|
|
|
llama-grammar.cpp
|
2025-01-13 08:55:48 +02:00
|
|
|
llama-hparams.cpp
|
|
|
|
llama-impl.cpp
|
|
|
|
llama-kv-cache.cpp
|
|
|
|
llama-mmap.cpp
|
|
|
|
llama-model-loader.cpp
|
|
|
|
llama-model.cpp
|
|
|
|
llama-quant.cpp
|
2024-08-08 14:16:50 +03:00
|
|
|
llama-sampling.cpp
|
2025-01-13 08:55:48 +02:00
|
|
|
llama-vocab.cpp
|
2024-08-08 14:16:50 +03:00
|
|
|
unicode.cpp
|
|
|
|
unicode-data.cpp)
|
2023-12-21 20:48:52 +00:00
|
|
|
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS})
|
2023-12-29 19:23:27 +09:00
|
|
|
|
|
|
|
if (WHISPER_CLBLAST)
|
|
|
|
set(CLBLAST_LIBNAME clblast)
|
|
|
|
endif ()
|
|
|
|
target_link_libraries(${TARGET} PRIVATE common common-sdl whisper ${SDL2_LIBRARIES} ${CLBLAST_LIBNAME} ${CMAKE_THREAD_LIBS_INIT})
|
2023-03-27 21:00:32 +03:00
|
|
|
|
2023-12-12 12:35:00 +01:00
|
|
|
if(WIN32)
|
2023-12-21 20:48:52 +00:00
|
|
|
# It requires Windows 8.1 or later for PrefetchVirtualMemory
|
|
|
|
target_compile_definitions(${TARGET} PRIVATE -D_WIN32_WINNT=0x0602)
|
2023-12-12 12:35:00 +01:00
|
|
|
endif()
|
|
|
|
|
2023-03-27 21:28:00 +03:00
|
|
|
include(DefaultTargetOptions)
|
2023-03-27 21:00:32 +03:00
|
|
|
endif ()
|