[CMake] Re: [Insight-users] Qmake to CMake migration - IMAGES

Pavan Podila pavan.podila at gmail.com
Fri Jan 21 09:50:28 EST 2005


Yes, I didn't include the image_collection.cpp file. That solves it. I 
was including only the header.

Is there a recommended directory structure I can use for the Qt+CMake 
projects. I want to keep my generated files separate from my own source 
files. You mentioned about the out-of-source build. Can you provide more 
info on that.

Thanks for your help.
Pavan

Clinton Stimpson wrote:

>It would be nice to have CMake help with image collections instead of doing
>a custom build rule.
>
>So your build rule generates a file called image_collection.cpp?  And are
>you adding that file to the list of sources to build the executable with. 
>Building without that will never give you a linker error and you won't see
>any images from that collection showing up in the application.
>
>I've whipped up a simple little test app to demonstrate how this works.  I
>can zip it up and send it to anyone who wants it.
>
>I don't think you can direct moc generated files to go somewhere other than
>the build directory.  I use out-of-source builds, so that is never a
>concern for me.
>
>Once you have things setup, I don't see how qmake or cmake have much of an
>advantage over each other in adding files during development.
>
>Clint
>
>Quoting Pavan Podila <pavan.podila at gmail.com>:
>
>  
>
>>Hi Clinton,
>>    I tried this step but I still don't see any images in the
>>application. In VS.NET I see that the CMake rule for images is executed
>>and it is also generating the image_collection.cpp. However when I run
>>the application, there are no icons/images.
>>
>>Also I had the following questions:
>>1. Can I direct the MOC generated files into a specific directory.
>>2. Have you tried the QMsNet2003 addin for VS.NET 2003. It really
>>simplifies the management of Qt files, both moc generated and images.
>>Reason I am asking is, I am still in the development phase and I keep
>>adding more images and files that need to be moc'ed. Will CMake take
>>care of this dynamically through it's rules.
>>
>>Cheers!
>>Pavan
>>
>>Clinton Stimpson wrote:
>>
>>    
>>
>>>To make an image collection, we do something like the following.
>>>SET(IMG_SRCS ${PRJ_SOURCE_DIR}/images/pic1.png
>>>${PRJ_SOURCE_DIR}/images/pic2.png ${PRJ_SOURCE_DIR}/images/pic3.png )
>>>ADD_CUSTOM_COMMAND(OUTPUT ${PRJ_BINARY_DIR}/image_collection.h COMMAND
>>>${QT_UIC_EXECUTABLE} ARGS -o ${PRJ_BINARY_DIR}/image_collection.h
>>>-embed prj ${IMG_SRCS} DEPENDS ${IMG_SRCS}) Then image_collection.h is
>>>included in our source code. There may be some extra things on the
>>>code side, but this is what we have in our CMake file. Clint At 09:24
>>>AM 1/20/2005, Pavan Podila wrote:
>>>
>>>      
>>>
>>>>>Hi,
>>>>>  I am in the process of migrating our build file from Qmake to
>>>>>CMake. I dont know how to incorporate the "IMAGES = " declaration in
>>>>>Qmake into CMake. Please provide some suggestions.
>>>>>
>>>>>Thanks,
>>>>>Pavan
>>>>>_______________________________________________
>>>>>Insight-users mailing list
>>>>>Insight-users at itk.org
>>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>>          
>>>>>
>>>>
>>>>        
>>>>
>>>_______________________________________________
>>>CMake mailing list
>>>CMake at www.cmake.org
>>>http://www.cmake.org/mailman/listinfo/cmake
>>>
>>>      
>>>
>
>
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20050121/c1dede94/attachment.html


More information about the CMake mailing list