[CMake] Problem with resource.qrc on a Qt Library

wvalenzuela waldovalenzuela at yahoo.com
Sun May 25 16:58:06 EDT 2014


Hi Guys,

I am creating a library using qt classes and I want to add a qt resource
file, to use some icons in the library, my code is:

SET(RESOURCES resource.qrc)
SOURCE_GROUP("Resources" FILES ${RESOURCES})
QT5_ADD_RESOURCES(RESOURCES_SOURCES ${RESOURCES})

get_target_property(QtCore_location Qt5::Core LOCATION)

set_source_files_properties(${RESOURCES_SOURCES} PROPERTIES GENERATED ON)

ADD_LIBRARY(${PROJECT_NAME} SHARED ${HEADERS} ${SOURCES} ${QT_LIBRARIES}
${RESOURCES_SOURCES})

INSTALL(TARGETS ${PROJECT_NAME}
		RUNTIME DESTINATION bin
		LIBRARY DESTINATION lib
		ARCHIVE DESTINATION lib/static)

QT5_USE_MODULES(${PROJECT_NAME} Core Gui Widgets OpenGL OpenGLExtensions)

the problem is that I get the following error when I try to compile.

make: *** No rule to make target 'qrc_resource.cpp'.  Stop.

I think that I am missing something to embedded the resource.qrc into the
library that I am creating. 

I really appreciate any help on this..

Cheers,

Waldo





--
View this message in context: http://cmake.3232098.n2.nabble.com/Problem-with-resource-qrc-on-a-Qt-Library-tp7587480.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list