simplifying further
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
include_directories(${Qt5Widgets_INCLUDE_DIRS} ${QtQml_INCLUDE_DIRS})
|
||||
add_definitions(${Qt5Widgets_DEFINITIONS} ${QtQml_DEFINITIONS} ${${Qt5Quick_DEFINITIONS}})
|
||||
|
||||
qt5_add_resources(QT_RESOURCES qml.qrc)
|
||||
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
|
||||
|
||||
set(PROJECT "MinimalQml")
|
||||
|
||||
project(${PROJECT})
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++11 -fstrict-aliasing -pedantic-errors -pedantic -Wno-deprecated-declarations -Wno-unused-variable")
|
||||
|
||||
if(NOT DEFINED HEADERS)
|
||||
file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED SOURCES)
|
||||
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
endif()
|
||||
|
||||
source_group("Header Files" FILES ${HEADERS})
|
||||
source_group("Source Files" FILES ${SOURCES})
|
||||
|
||||
add_executable(${PROJECT} ${HEADERS} ${SOURCES} ${QT_RESOURCES})
|
||||
|
||||
target_link_libraries(${PROJECT}
|
||||
Qt5::Widgets
|
||||
Qt5::Qml
|
||||
Qt5::Quick
|
||||
)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ int main(int argc, char** argv)
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
engine.load(QUrl(QStringLiteral("./src/main.qml")));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>main.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Reference in New Issue
Block a user