chore(cpn): cmake use automoc and autouic (#4258)
This commit is contained in:
@@ -1,37 +1,34 @@
|
||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${maxLibQt_SOURCE_DIR}/widgets)
|
||||
|
||||
set(generaledit_NAMES
|
||||
project(generaledit)
|
||||
|
||||
set(${PROJECT_NAME}_NAMES
|
||||
calibration
|
||||
generaledit
|
||||
generaloptions
|
||||
generalsetup
|
||||
hardware
|
||||
timezoneedit
|
||||
trainer
|
||||
)
|
||||
|
||||
set(generaledit_SRCS
|
||||
calibration.cpp
|
||||
hardware.cpp
|
||||
trainer.cpp
|
||||
generaloptions.cpp
|
||||
timezoneedit.cpp
|
||||
AddHeadersSources()
|
||||
|
||||
add_library(${PROJECT_NAME}
|
||||
${${PROJECT_NAME}_HDRS}
|
||||
${${PROJECT_NAME}_SRCS}
|
||||
)
|
||||
|
||||
set(generaledit_HDRS
|
||||
calibration.h
|
||||
hardware.h
|
||||
trainer.h
|
||||
generaloptions.h
|
||||
timezoneedit.h
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${CPN_COMMON_LIB}
|
||||
Qt5::Multimedia
|
||||
)
|
||||
|
||||
set(generaledit_UIS
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
"${maxLibQt_SOURCE_DIR}/widgets"
|
||||
PUBLIC
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
|
||||
foreach(name ${generaledit_NAMES})
|
||||
set(generaledit_SRCS ${generaledit_SRCS} ${name}.cpp)
|
||||
set(generaledit_HDRS ${generaledit_HDRS} ${name}.h)
|
||||
set(generaledit_UIS ${generaledit_UIS} ${name}.ui)
|
||||
endforeach()
|
||||
|
||||
qt5_wrap_ui(generaledit_SRCS ${generaledit_UIS})
|
||||
qt5_wrap_cpp(generaledit_SRCS ${generaledit_HDRS})
|
||||
|
||||
add_library(generaledit ${generaledit_SRCS})
|
||||
target_link_libraries(generaledit PRIVATE datamodels ${CPN_COMMON_LIB} Qt5::Multimedia)
|
||||
|
||||
Reference in New Issue
Block a user