zcy 2021-04-07 23:46:02 +08:00
commit b8989fc4c3
1 changed files with 23 additions and 12 deletions

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.5)
include_directories(third/lua/include)
link_directories(third/lua/lib)
message("CMAKE VERSION " ${VERSION})
include_directories(third/include)
link_directories(third/lib)
link_libraries(lua)
project(protoDebuger LANGUAGES CXX)
@ -17,16 +17,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Core Quick Widgets REQUIRED)
include(D:\\project\\c++qt\\qsswraper\\CMakeLists.txt)
set(HEADERS # 待预编译的cpp头文件
dialog.h
)
set(SOURCES # 待预编译的cpp代码
dialog.cpp
main.cpp
)
set(NO_MOC_SOURCES
)
set(RESOURCES
qml.qrc
@ -37,23 +36,35 @@ set(QMLS
)
set (UIS
"dialog.ui"
${QsswraperUI})
${QsswraperUI}
)
include(D:\\project\\qt\\qsswraper\\CMakeLists.txt)
include(D:\\project\\qt\\qsswraper\\extserial\\src\\qextserialport.cmake)
QT5_WRAP_CPP(MOC ${SOURCES} ) # moc
QT5_WRAP_CPP(MOCHEADER ${HEADERS} ) # moc
QT5_ADD_RESOURCES(RCC ${RESOURCES}) # rcccpp
QT5_WRAP_UI(UIC ${UIS}) # uicui_x.h
message("MOC " ${MOC} ${MOCHEADER})
message("UIC " ${UIC})
message("RCC " ${RCC})
FOREACH(list ${SOURCES})
message("SOURCES file " ${list})
ENDFOREACH(list)
FOREACH(list ${MOCHEADER})
message("MOCHEADER file" ${list})
ENDFOREACH(list)
FOREACH(list ${NO_MOC_SOURCES})
message("NO_MOC_SOURCES file" ${list})
ENDFOREACH(list)
add_executable(protoDebuger #最后需要参与链接生成的是
${SOURCES} #1. cpp
${MOC} #2. cpp
${RCC} #3. cpp
${UIC}
${NO_MOC_SOURCES}
)
target_compile_definitions(protoDebuger