Skip to content

Commit

Permalink
Fix windows build.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Jul 15, 2017
1 parent dc8745e commit 4907a23
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cppan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,17 @@ projects:
- training/lstmtester.*
- training/normstrngs.*
- training/unicharset_training_utils.*
- training/validat.*
include_directories: training
dependencies:
- common_training
- pvt.cppan.demo.unicode.icu.i18n
options:
any:
link_libraries:
win32:
private:
- Shlwapi

lstmeval:
files: training/lstmeval.cpp
Expand Down
9 changes: 9 additions & 0 deletions training/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,22 @@ set(unicharset_training_src
normstrngs.h
unicharset_training_utils.cpp
unicharset_training_utils.h

validate_grapheme.h validate_indic.h validate_khmer.h
validate_myanmar.h validator.h
validate_grapheme.cpp validate_indic.cpp validate_khmer.cpp
validate_myanmar.cpp validator.cpp

)
add_library (unicharset_training ${unicharset_training_src})
if (NOT CPPAN_BUILD)
target_link_libraries (unicharset_training common_training ${ICU_LIBRARIES})
else()
target_link_libraries (unicharset_training common_training pvt.cppan.demo.unicode.icu.i18n)
endif()
if (WIN32)
target_link_libraries (unicharset_training Shlwapi)
endif()
project_group (unicharset_training "Training Tools")


Expand Down
10 changes: 10 additions & 0 deletions training/pango_font_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
#include "pango/pangocairo.h"
#include "pango/pangofc-font.h"

#ifdef _MSC_VER
#ifndef strcasecmp
#define strcasecmp stricmp
#endif
#include <Shlwapi.h>
#ifndef strcasestr
#define strcasestr StrStrIA
#endif
#endif

STRING_PARAM_FLAG(fontconfig_tmpdir, "/tmp",
"Overrides fontconfig default temporary dir");

Expand Down

0 comments on commit 4907a23

Please sign in to comment.