[CMake] Re: [Insight-users] Qmake to CMake migration - IMAGES
Filipe Sousa
natros at gmail.com
Sat Jan 22 06:01:30 EST 2005
On Friday 21 January 2005 06:23, Clinton Stimpson wrote:
I've been using this macro to help me with image collections
MACRO(QT_IMAGE_COLLECTION project output_file)
FOREACH(image ${ARGN})
SET(image_collection ${image_collection} ${CMAKE_CURRENT_SOURCE_DIR}/${image})
ENDFOREACH(image ${ARGN})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${output_file}
COMMAND ${QT_UIC_EXECUTABLE}
ARGS -embed ${project} -o ${CMAKE_CURRENT_BINARY_DIR}/${output_file} ${image_collection}
DEPENDS ${image_collection}
)
SET_DIRECTORY_PROPERTIES(PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES
${CMAKE_CURRENT_BINARY_DIR}/${output_file})
ENDMACRO(QT_IMAGE_COLLECTION)
QT_IMAGE_COLLECTION(myproject image_collection.cc
pics/edit.png
pics/insert.png
pics/insertcell.png
pics/key_enter.png
pics/remove.png
pics/save.png
pics/searchbar_erase.png
pics/stock_kH.png
pics/stock_pf.png
pics/stock_pf2.png
pics/undo.png
)
ADD_EXECUTABLE(myproject image_collection.cc ....)
>
> It would be nice to have CMake help with image collections instead of doing
> a custom build rule.
You can always extend cmake with a plugin for that.
> 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.
>
[...]
-- Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050122/e764220f/attachment.pgp
More information about the CMake
mailing list