On 05/19/2018 01:48 PM, Kornel Benko wrote: > > Am Samstag, 19. Mai 2018 17:42:41 CEST schrieb Jürgen Spitzmüller > <sp...@lyx.org>: > > > Am Samstag, den 19.05.2018, 17:37 +0200 schrieb Kornel Benko: > > > > Am Samstag, 19. Mai 2018 12:58:37 CEST schrieb Jürgen Spitzmüller <sp > > > > i...@lyx.org>: > > > > > Am Samstag, den 19.05.2018, 12:07 +0200 schrieb Kornel Benko: > > > > > > No, it does not. For windows it is using > > > > 'development/cmake/lyx.rc'. > > > > > > But, for reason I don't > > > > > > understand, the icon creation is explicitly disabled if using > > > > mingw. > > > > > > See src/CMakeLists.txt:97 > > > > > > if(WIN32 AND NOT MINGW) > > > > > > set(FILE_RC ${TOP_CMAKE_PATH}/lyx.rc) > > > > > > message(STATUS "Using icon defined in resource file: > > > > > > ${FILE_RC}") > > > > > > endif() > > > > > > > > > > Is this relevant? > > > > > > > > > > https://stackoverflow.com/questions/3526794/ > > > > > > > > > > Jürgen > > > > > > > > > > > Kornel > > > > > > > > It is. Since we are compiling with mingw, both WIN32 and MINGW are > > > > set. > > > > In this case is FILE_RC not set, so that LyX.exe is not dependent on > > > > lyx.rc. > > > > > > I meant whether the stackexchange threat I posted was relevant, since > > > it deals with some setting that needs to be done for windres with MinGW > > > and cmake. > > > > > > Jürgen > > > > Ah, OK. Should be doable that way. Provided one has windres. In my > case, although ubuntu is based on debian, > > I don't get it through standard package sources. >
I seem to have windres, actually, though under a slightly different name. It's part of the mingw32-binutils package, but is installed as /usr/bin/i686-w64-mingw32-windres. There is code in CMakeLists.txt to set this, and it seems to work: build/CMakeFiles/3.11.0/CMakeRCCompiler.cmake:set(CMAKE_RC_COMPILER "/usr/bin/i686-w64-mingw32-windres") But it doesn't seem to get used anywhere. I guess all we need to do now is figure out where and how to invoke this to build a resource file from /development/cmake/lyx.rc. The link that Jürgen found suggests we need somthing like: ${CMAKE_RC_COMPILER} -O coff -i development/cmake/lyx.rc -o lyx.coff and then to link the lyx.coff file into the executable. Riki