PDA

View Full Version : Adding qrc file to cmake?



akshaysulakhe
11th July 2013, 09:50
Hello friends,
I am using cmake for my project, and resource file for all icons and images. As i have not added the qrc file name in my cmake file, i am unable to see the images. I searched on internet how to do it, but i can't find much. The qrc file is within a icons directory, and icons directory is in my project directory. Kindly let me know how to add the qrc file in cmake. Thank you for your time.

ChrisW67
11th July 2013, 10:22
...

SET(helloworld_SOURCES main.cpp hellowindow.cpp)
SET(helloworld_HEADERS hellowindow.h)
SET(helloworld_FORMS hellowindow.ui)
SET(helloworld_RESOURCES images.qrc)

QT4_WRAP_CPP(helloworld_HEADERS_MOC ${helloworld_HEADERS})
QT4_WRAP_UI(helloworld_FORMS_HEADERS ${helloworld_FORMS})
QT4_ADD_RESOURCES(helloworld_RESOURCES_RCC ${helloworld_RESOURCES})

ADD_EXECUTABLE(helloworld ${helloworld_SOURCES}
${helloworld_HEADERS_MOC}
${helloworld_FORMS_HEADERS}
${helloworld_RESOURCES_RCC})

akshaysulakhe
11th July 2013, 11:28
Thank you for the information. Is helloworld the project name here. We have to set project too in cmake, but in my cmake i cant see set project.