Skip to content

Commit 4a8c092

Browse files
committed
please compile
1 parent 1a90395 commit 4a8c092

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

tools/mtmd/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if (BUILD_SHARED_LIBS)
2828
set_target_properties(mtmd PROPERTIES POSITION_INDEPENDENT_CODE ON)
2929
target_compile_definitions(mtmd PRIVATE LLAMA_SHARED LLAMA_BUILD)
3030
add_library(mtmd_shared SHARED $<TARGET_OBJECTS:mtmd>)
31-
target_link_libraries(mtmd_shared PRIVATE ggml llama ${CMAKE_THREAD_LIBS_INIT})
31+
target_link_libraries(mtmd_shared PRIVATE ggml llama mtmd_audio ${CMAKE_THREAD_LIBS_INIT})
3232
install(TARGETS mtmd_shared LIBRARY)
3333
endif()
3434

tools/mtmd/mtmd-audio.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
#define MA_API static
1111
#include "miniaudio.h"
1212

13+
// fix problem with std::min and std::max
14+
#if defined(_WIN32)
15+
#define WIN32_LEAN_AND_MEAN
16+
#ifndef NOMINMAX
17+
# define NOMINMAX
18+
#endif
19+
#include <windows.h>
20+
#endif
21+
1322
#define _USE_MATH_DEFINES // for M_PI
1423
#include <cmath>
1524
#include <cstdint>

tools/mtmd/mtmd.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ mtmd_bitmap * mtmd_helper_bitmap_init_from_buf(const unsigned char * buf, size_t
619619
LOG_ERR("Unable to read WAV audio file from buffer\n");
620620
return nullptr;
621621
}
622-
pcmf32.resize(16000*4 + 400); // DEBUG!!!!!!
623622
return mtmd_bitmap_init_from_audio(pcmf32.size(), pcmf32.data());
624623
}
625624

0 commit comments

Comments
 (0)