[CMake] find_path / find_package hardcoded path

Rolf Eike Beer eike at sf-mail.de
Wed Aug 28 05:56:37 EDT 2019


Am 2019-08-28 11:39, schrieb Stéphane Ancelot:
> Hi,
> 
> using mingw32 with win10 , I can not manage to find jpeg libs .
> 
> I tried setting JPEG_DIR, it fails.
> 
> it also fails setting CMAKE_FIND_ROOT_PATH
> 
> set(JPEG_DIR c:\\work\\WIN32DEPS\\jpegfolder)

Use forward slashes. Don't do it in the CMakeLists.txt as it is 
something happening only on your system, so pass it on the command line, 
e.g. as

  cmake -D CMAKE_PREFIX_PATH=c:/work/win32deps/jpegfolder

Eike
-- 


More information about the CMake mailing list