ICU binaries not found Windows VS 2017 cmake


This is related to this post:

I’m using cmake from Visual Studios community 2017 to build META-toolkit.

It runs the following command(shortened for convenience):

cmake.exe  -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Programs\meta-toolkit\install\meta-default"  -DCMAKE_BUILD_TYPE="Release"  -DICU_ROOT="D:/Programs/meta-toolkit/deps/icu-60.2"  -DICU_DIR="D:/Programs/meta-toolkit/deps/icu-60.2/bin64"  -DCMAKE_CXX_COMPILER="cl.exe"  -DCMAKE_BUILD_TYPE="Release" -DCMAKE_MAKE_PROGRAM="ninja.exe" "D:\Programs\meta-toolkit"

I get the following error:

1> -- ICU version found is 58.2.0, expected 60.2; attempting to build ICU from scratch...
1> -- ICU building not supported on Windows.
1> CMake Error at deps/meta-cmake/FindOrBuildICU.cmake:56 (message):
1>      -- Please download the latest ICU binaries from
1> Call Stack (most recent call first):
1>   CMakeLists.txt(92): (FindOrBuildICU)
1> -- Configuring incomplete, errors occurred!

I downloaded the 60.2 binaries. They are in deps/icu-60.2 and contains the folders bin64, include and lib64. From FindOrBuildICU.cmake, it looks like cmake can’t find the correct ICU directory. I tried setting ICU_ROOT and ICU_DIR to the root directory and also to the bin64 directory but this doesn’t work. ICU_ROOT and ICU_DIR don’t appear to be used anywhere in the make files. How is cmake supposed to find ICU?


You have to add it as a variable in the cmake for windows gui ICU_whatever along with the path with the exact location of the files iirc. if you’re using the built-in cmake for VS17, i bet you can add variables in a similar fashion.

I had a similar problem and I bet if you look up some of my earlier posts you might see it there.


Thanks for replying!

It is working for me now after restarting VS17 and running a clean build. I had previously defined the ICU_ROOT variable but maybe I needed to run a clean build for the new variable to be picked up.

You seem to be experienced with MeTA and Windows. Does MeTA currently support the MSVC compiler? I’ve seen posts to this forum that say it does not support MSVC, but they are from awhile ago. Perhaps now it is supported?

I need to use MSVC, so I will be looking into porting MeTA to MSVC in the next week. Probably I won’t get very far.


It seems that META will compile with the MSVC compiler. I used VS 2017 community edition with CMAKE. So far all the functionality that I need is working.

However, 31 unit tests are failing. Mostly to do with forward and inverted indexing.