On 2013-07-08 12:59, Júlio Hoffimann wrote:
My CMakeLists.txt resides at the same directory as icons.qrc, but my main
application is linked in a completely separate folder:

main/
-- resources/
-- -- pixmaps/
-- CMakeLists1.txt
-- icons.qrc
exe/
-- CMakeLists2.txt
-- main.cpp

Is it okay? What should be the CMakeLists(1|2).txt in this case?

Our project tree looks roughly like this, but we don't have a CMakeLists.txt in what corresponds to your 'main'; we just do (exe/CMakeLists.txt):

qt4_add_resources(resSources ../main/icons.qrc)
add_executable(... ${resSources})

If you also have sources in 'main' that you are trying to compile into a static library (containing the resources), then you probably need Q_INIT_RESOURCE, as you discovered.

--
Matthew

--

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

Reply via email to