CMakeLists.txt
cmake_minimum_required(VERSION 3.0.0) project(hello VERSION 0.1.0) include(
CTest) enable_testing() #qt project moc dependent set(CMAKE_INCLUDE_CURRENT_DIR ON) set(
CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(
CMAKE_CXX_STANDARD17) set(CMAKE_CXX_STANDARD_REQUIRED ON) # lookup qt Related packages find_package
(Qt5 COMPONENTS Widgets Core Gui REQUIRED) # WIN32 If this flag is added, there will be no console add_executable
(hello WIN32 main.cpp widget.ui) set(CPACK_PROJECT_NAME ${PROJECT_NAME}) set(
CPACK_PROJECT_VERSION ${PROJECT_VERSION}) include(CPack) # Connect related packages
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Core Qt5::Gui)
xxx.qrc Resource file format reference
<RCC> <qresource prefix="/"> <file>01.jpg</file> </qresource> </RCC>
Technology
Daily Recommendation