<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 23 Jan 2021 at 09:07, Yu Jin <<a href="mailto:yu_jin@lyx.org">yu_jin@lyx.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 22. Jan. 2021 um 22:33 Uhr schrieb Thibaut Cuvelier <<a href="mailto:tcuvelier@lyx.org" target="_blank">tcuvelier@lyx.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 21 Jan 2021 at 19:23, Kornel Benko <<a href="mailto:kornel@lyx.org" target="_blank">kornel@lyx.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Thu, 21 Jan 2021 18:26:38 +0100<br>
schrieb Thibaut Cuvelier <<a href="mailto:tcuvelier@lyx.org" target="_blank">tcuvelier@lyx.org</a>>:<br>
<br>
> Dear list, and Pavel mostly :)<br>
> <br>
> I'm starting again to configure LyX on Windows, and the CMake files do not behave as<br>
> expected.<br>
> <br>
> I am setting -DLYX_DEPENDENCIES_DOWNLOAD=1 on the command line, but this is what it<br>
> outputs:<br>
> <br>
> "C:\Program Files\JetBrains\CLion\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug<br>
> -DLYX_DEPENDENCIES_DOWNLOAD=1 -G "CodeBlocks - NMake Makefiles" D:\Thibaut\LyX --<br>
> TOP_SRC_DIR = D:/Thibaut/LyX --<br>
> -- Building out-of-source<br>
> -- Selecting build type defaults from <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> -- ERROR: Could NOT find GNUWIN32, please set GNUWIN32_DIR<br>
> -- ERROR: or let cmake download all required files by using<br>
> -DLYX_DEPENDENCIES_DOWNLOAD=1 CMake Error at<br>
> development/cmake/modules/FindGNUWIN32.cmake:43 (message): Call Stack (most recent call<br>
> first): development/cmake/modules/LyXPaths.cmake:57 (find_package)<br>
>   CMakeLists.txt:251 (include)<br>
> <br>
> It really looks like the parameter I set is disregarded (as if the check is done before<br>
> any downloading can happen). My CMake skills do not allow me to debug this thoroughly…<br>
> <br>
> Moreover, the variables MSVC14 and MSVC10 are discouraged since CMake 3.8:<br>
> <a href="https://cmake.org/cmake/help/v3.8/variable/MSVC14.html" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.8/variable/MSVC14.html</a>. Plus, the same set of<br>
> dependencies can be used for Visual C++ 2017 and 2019, which the current code cannot do<br>
> (and there are no more MSVC variables for these). I am joining a patch to switch to the<br>
> now recommended MSVC_VERSION. It is untested due to the above issue.<br>
<br>
Since the FindGNUWIN32 is called form development/cmake/modules/LyXPaths.cmake<br>
and this is called from CMakeLists.txt:251, it is no wonder, that<br>
LYX_DEPENDENCIES_DOWNLOAD<br>
had no effect. (It is used at CMakeLists.txt:312, (means later)).<br></blockquote><div><br></div><div>Here is my attempt at solving the issue. It works on my side, at least (and it is able to download the right file). The previous patch is merged in this one. <br></div><div><br></div><div>Can I push this commit?</div></div></div></blockquote><div><br></div><div>Please check this link:</div><div><a href="http://ftp.lyx.org/pub/lyx/devel/win_deps/" target="_blank">http://ftp.lyx.org/pub/lyx/devel/win_deps/</a></div><div>there are dependencies "2019" and both 32 and 64 bit variants, I don't see anything regarding that in your patch.<br clear="all"></div></div></div></blockquote><div><br></div><div>Thanks for noticing this, I was limiting myself to the current FTP (<a href="http://lyx.de">lyx.de</a>). <br></div><div><br></div><div>Here is a new version of the patch using this new FTP. It's more complex, because CMake almost does whatever it can to avoid checking if you are compiling for 32 or 64 bits… (The most common solution, based on checking the size of a void*, is completely wrong, because it is based on the running version of CMake, and not the compiler being used — on Windows, there is not really an incentive to have everything 64 bits, so it's quite normal to use a 32-bit CMake with a 64-bit compiler.)<br></div></div></div>