chore(cpn): cmake use automoc and autouic (#4258)

This commit is contained in:
Neil Horne
2023-10-28 20:03:29 +10:00
committed by GitHub
parent e8d555da11
commit 9dd4a1e95c
11 changed files with 383 additions and 431 deletions
+16
View File
@@ -130,3 +130,19 @@ function(AddHWGenTarget input template output)
DEPENDS ${INPUT_JSON} ${LEGACY_JSON} ${TEMPLATE}
)
endfunction()
macro(AddHeadersSources)
foreach(name
${${PROJECT_NAME}_NAMES})
set(${PROJECT_NAME}_SRCS
${${PROJECT_NAME}_SRCS}
${name}.cpp
)
set(${PROJECT_NAME}_HDRS
${${PROJECT_NAME}_HDRS}
${name}.h
)
endforeach()
endmacro()
+3
View File
@@ -5,6 +5,9 @@ if(APPLE AND EXISTS /usr/local/opt/qt5)
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5Core)
find_package(Qt5Widgets)
find_package(Qt5Xml)