Hello,
Files put in a resource file are converted to base64, then compiled in the
executable/library. That's why CMake (and qmake) add the result of the qrc
"compilation" to the source files.
>From what you say, it looks like icons.qrc is not in the same directory
your CMakeLists.txt is. Make sure you use a fully-identifiable path here:
QT4_ADD_RESOURCES(lib_resources icons.qrc)
add_library(mylib ${lib_srcs} ${lib_resources})
E. g. you may need to use this:
QT4_ADD_RESOURCES(lib_resources ${PROJECT_SOURCE_DIR}/resources/icons.qrc)
On Mon, Jul 8, 2013 at 6:42 PM, Júlio Hoffimann
<[email protected]>wrote:
> Pau,
>
> I did exactly that, I think the issue is with the file paths not with my
> CMakeLists.txt. What Qt does with resource files exactly? Is it a runtime
> load? The paths must be relative to the linked executable? Also, where I
> can find the complete specification for that XML in icons.qrc?
>
> Bogdan,
>
> I don't need to explicitly copy the icons.qrc nor the resources/pixmaps/
> directory to the binary dir?
>
> Best,
> Júlio.
>
> --
>
> 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
>
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
--
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