Kermit Mei schrieb: > On Mon, 2009-03-30 at 18:15 +0200, Pau Garcia i Quiles wrote: >> On Mon, Mar 30, 2009 at 6:04 PM, Kermit Mei <[email protected]> wrote: >>> Hello community! I want to change my program's icon on windows, and it >>> wrote with Qt4. I looked up the assistant, it told me the following. >>> >>> But I don't know how to use it in cmake? >> Just add the .rc file to the sources list, like it was another .cpp file: >> >> ADD_EXECUTABLE( myexe source1.cpp source2.cpp resource.rc ) >> >>> And, another question: If I use MinGW+Qt, but not M$ VC++, can I use it? >> I think so, yes. > > Hi Pau, What you said I have tried. But nothing changed in the view of > myexe, it is also a ugly white area with a blue barrier;p > I do it like this: > IF(WIN32) > ADD_EXECUTABLE(qfrt WIN32 qfrt.cpp qfrt.rc) > ELSE(WIN32) > ADD_EXECUTABLE(qfrt qfrt.cpp) > ENDIF(WIN32) > > And the content of qfrt.rc is: > IDI_ICON1 ICON DISCARDABLE ":/icon/myapp.ico" > > and I also tried "./gui/icon/myapp.ico" where the .ico file exists. > > Thank you, all the same. And hope more help;p > This is working fine on windows with msvc but will not work with mingw: http://public.kitware.com/Bug/view.php?id=4068
Christian _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
