Skip to content

Commit 9a0dcb6

Browse files
committed
will this monster compile?
1 parent f151854 commit 9a0dcb6

File tree

6 files changed

+94449
-9647
lines changed

6 files changed

+94449
-9647
lines changed

tools/mtmd/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# mtmd
22

3+
# compile mtmd-audio separately to avoid long compile times
4+
add_library(mtmd_audio STATIC mtmd-audio.cpp mtmd-audio.h)
5+
target_link_libraries(mtmd_audio PRIVATE ggml ${CMAKE_THREAD_LIBS_INIT})
6+
target_compile_features(mtmd_audio PRIVATE cxx_std_17)
7+
target_include_directories(mtmd_audio PRIVATE .)
8+
39
add_library(mtmd OBJECT
410
mtmd.cpp
511
mtmd-helper.cpp
@@ -9,7 +15,7 @@ add_library(mtmd OBJECT
915
clip-impl.h
1016
)
1117

12-
target_link_libraries(mtmd PRIVATE ggml llama ${CMAKE_THREAD_LIBS_INIT})
18+
target_link_libraries(mtmd PRIVATE ggml llama mtmd_audio ${CMAKE_THREAD_LIBS_INIT})
1319

1420
target_include_directories(mtmd PUBLIC .)
1521
target_include_directories(mtmd PRIVATE ../..)
@@ -28,6 +34,7 @@ endif()
2834

2935
if (NOT MSVC)
3036
target_compile_options(mtmd PRIVATE -Wno-cast-qual) # stb_image.h
37+
target_compile_options(mtmd_audio PRIVATE -Wno-cast-qual) # miniaudio.h
3138
endif()
3239

3340
if(TARGET BUILD_INFO)

0 commit comments

Comments
 (0)