Skip to content

Commit b4f3e89

Browse files
committed
Remove macro for adding RCC. It only made sense for a project with
a lot of resources in which compiling the qrc.cpp everytime alongside the other cpp files took too long.
1 parent f301c0d commit b4f3e89

File tree

4 files changed

+4
-61
lines changed

4 files changed

+4
-61
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ endif()
6565
# Set the directory where tools will get installed
6666
set( DEMO_TOOLS_BINARY_DIR ${CMAKE_BINARY_DIR}/tools )
6767

68-
# Include the macro for adding resources
69-
include( cmake/rcc.cmake )
70-
7168
# Add other subdirectories containing CMakeLists.txt file
7269
add_subdirectory( src )
7370
add_subdirectory( tools )

cmake/rcc.cmake

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
set( demo_SRCS demo.cpp )
2+
qt5_add_resources( demo_QRC demo.qrc )
23

34
if( ANDROID )
4-
add_library( Demo SHARED ${demo_SRCS} )
5+
add_library( Demo SHARED ${demo_SRCS} ${demo_QRC} )
56
qt5_use_modules( Demo Qml Quick )
67
else()
7-
add_executable( Demo ${demo_SRCS} )
8+
add_executable( Demo ${demo_SRCS} ${demo_QRC} )
89
qt5_use_modules( Demo Qml Quick )
910
endif()
1011

1112
target_link_libraries( Demo Qt5::Qml Qt5::Quick )
12-
13-
DEMO_ADD_RCC(src Demo.qml)

src/demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
int main(int argc, char *argv[])
55
{
66
QGuiApplication app(argc, argv);
7-
QQmlApplicationEngine engine(QUrl("qrc:/Demo/src/Demo.qml"));
7+
QQmlApplicationEngine engine(QUrl("qrc:/Demo.qml"));
88
return app.exec();
99
}

0 commit comments

Comments
 (0)