On 2018-02-11 15:13+0100 Mario Emmenlauer wrote:
I use mingw-w64-x86_64-cmake 3.10.2 on MSYS2. Generally it works well, but just recently I started to have problems with CMAKE_PREFIX_PATH. Its possible that the problems have been there forever, but I now just found them due to a better use of CI systems. The problem is that cmake is not finding package configuration files correctly. I have such files in DESTDIR/lib/cmake, i.e. for a library XXX there are typically files XXXConfig.cmake, XXXConfigVersion.cmake and XXXTargets.cmake (i.e. for Qt, VTK and others). But they are not found when I specify CMAKE_PREFIX_PATH=DESTDIR/lib/cmake in Unix path style. It does work when I specify the package configuration directory in Windows style! This makes things quite confusing, because many find_xxx() commands for headers and libraries work with Unix paths. So now I need to use CMAKE_PREFIX_PATH=UNIXDESTDIR for the normal find_xxx(), but add WINDESTDIR\lib\cmake for the package configuration files (*). Is this an MSYS2 issue or a standard cmake issue? I reported it with MSYS2 here https://github.com/Alexpux/MINGW-packages/issues/3337 in case someone can comment?
Hi Mario:
From <https://github.com/msys2/msys2/wiki/MSYS2-introduction>, and
what you said above it appears you are using the "native Windows" cmake version from the mingw64 repository rather than the POSIX-style cmake package you can install from the msys2 repository. I am pretty sure the native version would not do well with non-native POSIX-style paths so I am not surprised by your results. Anyhow, I suggest you experiment with native versus POSIX cmake packages in both CMD and bash (from msys2) environments to establish what the different results are in those four cases for native Windows and POSIX paths. Note I have no access to MinGW-w64/MSYS2 myself, but I do pay close attention to this platform because it is the best Windows platform for PLplot according to a fellow PLplot developer who does have a lot of practical experience with this platform. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
