No subject
Wed Apr 10 07:51:04 EDT 2013
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=FAlio Hoffimann
<julio.hoffimann at gmail.com>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=FAlio.
>
> --
>
> 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
>
--=20
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
--e89a8ffba1d7cf9d9304e102e60c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello,<div><br></div><div>Files put in a resource file are converted to bas=
e64, then compiled in the executable/library. That's why CMake (and qma=
ke) add the result of the qrc "compilation" to the source files.<=
/div>
<div><br></div><div>From what you say, it looks like icons.qrc is not in th=
e same directory your CMakeLists.txt is. Make sure you use a fully-identifi=
able path here:</div><div><br></div><div><div style=3D"color:rgb(34,34,34);=
font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,25=
5)">
QT4_ADD_RESOURCES(lib_resources icons.qrc)</div><div style=3D"color:rgb(34,=
34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255=
,255,255)">add_library(mylib ${lib_srcs} ${lib_resources})</div></div><div =
style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;ba=
ckground-color:rgb(255,255,255)">
<br></div><div style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;fo=
nt-size:13px;background-color:rgb(255,255,255)">E. g. you may need to use t=
his:</div><div style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;fo=
nt-size:13px;background-color:rgb(255,255,255)">
<br></div><div style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;fo=
nt-size:13px;background-color:rgb(255,255,255)">QT4_ADD_RESOURCES(lib_resou=
rces ${PROJECT_SOURCE_DIR}/resources/icons.qrc)</div><div><br><br><br><div =
class=3D"gmail_quote">
On Mon, Jul 8, 2013 at 6:42 PM, J=FAlio Hoffimann <span dir=3D"ltr"><<a =
href=3D"mailto:julio.hoffimann at gmail.com" target=3D"_blank">julio.hoffimann=
@gmail.com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir=3D"ltr"><div>Pau,<br></div><div><br></div><div>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 b=
e relative to the linked executable? Also, where I can find the complete sp=
ecification for that XML in icons.qrc?</div>
<div><br></div><div>Bogdan,</div><div><br></div><div>I don't need to ex=
plicitly copy the icons.qrc nor the resources/pixmaps/ directory to the bin=
ary dir?<br></div><div><br></div><div>Best,</div><div>J=FAlio.</div></div>
<br>--<br>
<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at <a href=3D"http://www.kitware.c=
om/opensource/opensource.html" target=3D"_blank">http://www.kitware.com/ope=
nsource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href=3D"http:/=
/www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">http://www.cmake.org/Wiki/=
CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=3D"_blank">h=
ttp://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br><b=
r clear=3D"all"><div><br></div>-- <br>Pau Garcia i Quiles<br><a href=3D"htt=
p://www.elpauer.org">http://www.elpauer.org</a><br>
(Due to my workload, I may need 10 days to answer)
</div>
--e89a8ffba1d7cf9d9304e102e60c--
More information about the CMake
mailing list