Skip to content

Commit

Permalink
exclude freetype.cpp file from being included in windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
swdee committed Aug 15, 2024
1 parent 9aaa1ea commit 7692621
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contrib/freetype.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

#ifndef _WIN32 // Exclude compiling on Windows platforms

#include "freetype.h"

FreeType2 FreeType2_CreateFreeType2() {
Expand Down Expand Up @@ -28,4 +31,6 @@ Size FreeType2_GetTextSize(FreeType2 f, const char *text,
int fontHeight, int thickness, int *baseLine) {
cv::Size sz = (*f)->getTextSize(text, fontHeight, thickness, baseLine);
return Size{sz.width, sz.height};
}
}

#endif // _WIN32

0 comments on commit 7692621

Please sign in to comment.