[Cmake] Embedding Icons in Qt with CMake

Steve Boyd skboyd at ucalgary . ca
Thu, 04 Sep 2003 16:41:47 -0700


Hi,

Has anybody successfully embedded button icons into their Qt project
using CMake to configure the make file?  

Apparently, the Qt tool UIC must be called with a "-embed" option to
generate a "qmake_image_collection.cpp" file which is then compiled and
linked to the executable output.

Any ideas how to do this with CMake?

Sincerely,

Steve

ps. Here is a snippet from the Makefile generated using "qmake" which
properly embeds the button icons.  How can I get CMake to generate
similar commands????

-----

.obj/qmake_image_collection.o: .ui/qmake_image_collection.cpp
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/qmake_image_collection.o
.ui/qmake_image_collection.cpp

.ui/qmake_image_collection.cpp: images/filenew \
		images/fileopen \
		images/Terminal.png \
		images/exit.png
	$(UIC)  -embed vis images/filenew images/fileopen images/Terminal.png
images/exit.png -o .ui/qmake_image_collection.cpp

-----
-- 
Steven Boyd

Assistant Professor
Department of Mechanical and Manufacturing Engineering
University of Calgary
2500 University Drive, N.W.
Calgary, Alberta, Canada, T2N 1N4

tel. 1.403.220.4173  fax. 1.403.282.8406  skboyd at ucalgary . ca
-------------------------------------------------------------------