Describe the bug
/res/resource.rc doesn't compiled due to wrong RC_FLAGS cmake variable
To Reproduce
the same as in issue #6
Expected behavior
res/resource.rc should be compiled without error
Screenshots
[ 86%] Building RC object CMakeFiles/Degate.dir/res/resource.rc.obj
C:/Qt/Qt5.12.0/Tools/mingw810_64/bin/windres.exe -O coff -DBOOST_NO_CXX11_SCOPED_ENUMS -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -IG:/personal_projects/Degate/rel_win_build/Degate_autogen/include -IG:/_LIBS/boost_1_70_0 -IG:/personal_projects/Degate/src -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtWidgets -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtGui -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtANGLE -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtCore -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/./mkspecs/win32-g++ -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtXml -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtOpenGL -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtConcurrent -Wall -g -fno-inline -std=c++11 G:/personal_projects/Degate/res/resource.rc CMakeFiles/Degate.dir/res/resource.rc.obj
C:/Qt/Qt5.12.0/Tools/mingw810_64/bin/windres.exe: unknown option -- W
Usage: C:/Qt/Qt5.12.0/Tools/mingw810_64/bin/windres.exe [option(s)] [input-file] [output-file]
The options are:
-i --input=<file> Name input file
-o --output=<file> Name output file
-J --input-format=<format> Specify input format
-O --output-format=<format> Specify output format
-F --target=<target> Specify COFF target
--preprocessor=<program> Program to use to preprocess rc file
--preprocessor-arg=<arg> Additional preprocessor argument
-I --include-dir=<dir> Include directory when preprocessing rc file
-D --define <sym>[=<val>] Define SYM when preprocessing rc file
-U --undefine <sym> Undefine SYM when preprocessing rc file
-v --verbose Verbose - tells you what it's doing
-c --codepage=<codepage> Specify default codepage
-l --language=<val> Set language when reading rc file
--use-temp-file Use a temporary file instead of popen to read
the preprocessor output
--no-use-temp-file Use popen (default)
-r Ignored for compatibility with rc
@<file> Read options from <file>
-h --help Print this help message
-V --version Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified. A single file name is an input file.
No input-file is stdin, default rc. No output-file is stdout, default rc.
C:/Qt/Qt5.12.0/Tools/mingw810_64/bin/windres.exe: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf32-iamcu elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
make[3]: *** [CMakeFiles/Degate.dir/res/resource.rc.obj] Error 1
make[3]: Leaving directory `G:/personal_projects/Degate/rel_win_build'
make[2]: *** [CMakeFiles/Degate.dir/all] Error 2
make[2]: Leaving directory `G:/personal_projects/Degate/rel_win_build'
make[1]: *** [CMakeFiles/Degate.dir/rule] Error 2
make[1]: Leaving directory `G:/personal_projects/Degate/rel_win_build'
rel_win_build\CMakeFiles\Degate.dir\flags.make:
...
RC_FLAGS = -Wall -g -fno-inline -std=c++11
RC_DEFINES = -DBOOST_NO_CXX11_SCOPED_ENUMS -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB
RC_INCLUDES = -IG:/personal_projects/Degate/rel_win_build/Degate_autogen/include -IG:/_LIBS/boost_1_70_0 -IG:/personal_projects/Degate/src -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtWidgets -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtGui -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtANGLE -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtCore -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/./mkspecs/win32-g++ -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtXml -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtOpenGL -IC:/Qt/Qt5.12.0/5.15.0/mingw81_64/include/QtConcurrent
rel_win_build\CMakeFiles\Degate.dir\build.make:
...
CMakeFiles/Degate.dir/res/resource.rc.obj: CMakeFiles/Degate.dir/flags.make
CMakeFiles/Degate.dir/res/resource.rc.obj: ../res/resource.rc
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=G:/personal_projects/Degate/rel_win_build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_20) "Building RC object CMakeFiles/Degate.dir/res/resource.rc.obj"
C:/Qt/Qt5.12.0/Tools/mingw810_64/bin/windres.exe -O coff $(RC_DEFINES) $(RC_INCLUDES) $(RC_FLAGS) /Y- G:/personal_projects/Degate/res/resource.rc CMakeFiles/Degate.dir/res/resource.rc.obj
...
Environment:
the same as in issue #6
Additional context
I don't know why mingw GCC 8.x.y compiler set such RC_FLAGS value.
If the line RC_FLAGS = -Wall -g -fno-inline -std=c++11 is commented out manually, then Degate compiles successfully.
I tried set(CMAKE_RC_FLAGS ""), but it doesn't help.
Any ideas?
Describe the bug
/res/resource.rcdoesn't compiled due to wrongRC_FLAGScmake variableTo Reproduce
the same as in issue #6
Expected behavior
res/resource.rc should be compiled without error
Screenshots
rel_win_build\CMakeFiles\Degate.dir\flags.make:
rel_win_build\CMakeFiles\Degate.dir\build.make:
Environment:
the same as in issue #6
Additional context
I don't know why mingw GCC 8.x.y compiler set such
RC_FLAGSvalue.If the line
RC_FLAGS = -Wall -g -fno-inline -std=c++11is commented out manually, then Degate compiles successfully.I tried
set(CMAKE_RC_FLAGS ""), but it doesn't help.Any ideas?