CMake on Windows

Thibaut Cuvelier tcuvelier at lyx.org
Fri Jan 22 21:33:27 UTC 2021


On Thu, 21 Jan 2021 at 19:23, Kornel Benko <kornel at lyx.org> wrote:

> Am Thu, 21 Jan 2021 18:26:38 +0100
> schrieb Thibaut Cuvelier <tcuvelier at lyx.org>:
>
> > Dear list, and Pavel mostly :)
> >
> > I'm starting again to configure LyX on Windows, and the CMake files do
> not behave as
> > expected.
> >
> > I am setting -DLYX_DEPENDENCIES_DOWNLOAD=1 on the command line, but this
> is what it
> > outputs:
> >
> > "C:\Program Files\JetBrains\CLion\bin\cmake\win\bin\cmake.exe"
> -DCMAKE_BUILD_TYPE=Debug
> > -DLYX_DEPENDENCIES_DOWNLOAD=1 -G "CodeBlocks - NMake Makefiles"
> D:\Thibaut\LyX --
> > TOP_SRC_DIR = D:/Thibaut/LyX --
> > -- Building out-of-source
> > -- Selecting build type defaults from configure.ac
> > -- ERROR: Could NOT find GNUWIN32, please set GNUWIN32_DIR
> > -- ERROR: or let cmake download all required files by using
> > -DLYX_DEPENDENCIES_DOWNLOAD=1 CMake Error at
> > development/cmake/modules/FindGNUWIN32.cmake:43 (message): Call Stack
> (most recent call
> > first): development/cmake/modules/LyXPaths.cmake:57 (find_package)
> >   CMakeLists.txt:251 (include)
> >
> > It really looks like the parameter I set is disregarded (as if the check
> is done before
> > any downloading can happen). My CMake skills do not allow me to debug
> this thoroughly…
> >
> > Moreover, the variables MSVC14 and MSVC10 are discouraged since CMake
> 3.8:
> > https://cmake.org/cmake/help/v3.8/variable/MSVC14.html. Plus, the same
> set of
> > dependencies can be used for Visual C++ 2017 and 2019, which the current
> code cannot do
> > (and there are no more MSVC variables for these). I am joining a patch
> to switch to the
> > now recommended MSVC_VERSION. It is untested due to the above issue.
>
> Since the FindGNUWIN32 is called form
> development/cmake/modules/LyXPaths.cmake
> and this is called from CMakeLists.txt:251, it is no wonder, that
> LYX_DEPENDENCIES_DOWNLOAD
> had no effect. (It is used at CMakeLists.txt:312, (means later)).
>

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.

Can I push this commit?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210122/cdd73442/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unnamed4.patch
Type: application/octet-stream
Size: 3779 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210122/cdd73442/attachment.obj>


More information about the lyx-devel mailing list