execute cmake on command line not finding package


I cloned this repo, and inorder to build in requires another external library. I go to the folder and execute the command:

cmake  -S . -B build/ -G Ninja 

but it returns:

CMake Error at C:/Program Files/CMake/share/cmake- 
 3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):

I assumed I just had to set up manually the freetype variables, so I did:

DFREETYPE_INCLUDE_DIR_freetype2=%ROOT_DIR%/external/freetype/include/freetype - 
DFREETYPE_INCLUDE_DIR_ft2build=%ROOT_DIR%/external/freetype/include - 
DFREETYPE_LIBRARY_RELEASE=%ROOT_DIR%/external/freetype/build/freetyped.lib -S . -B build/ -G Ninja 

but still getting the same error.
how do make cmake to find the packages using the command line?

Thanks in advance

That is not and cmake issue and has nothing to do with the comand line!

dit you really build and install FreeType / FreeType · GitLab ?

Where is the freetype-config-version.cmake file on your system?

or use fetch contents to build them on the fly …

I found the answer here. Sorry, I am just learning and got confused on what was producing the error.

Sorry, the answer at StackOverflow a hack!

May be it helps, but if you use find_packge(Freetype ...) you have to install it in right way!

You may set Freetype_DIR or set CMAKE_PREFIX_PATH to find them!