55 lines
1.9 KiB
CMake
55 lines
1.9 KiB
CMake
#----------------------------------------------------------------
|
|
# Packages
|
|
#----------------------------------------------------------------
|
|
# Find includes in corresponding build include_directories
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
# Instruct CMake to run moc automatically when needed
|
|
set(CMAKE_AUTOMOC ON)
|
|
# Create code from a list of Qt designer ui files
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
#----------------------------------------------------------------
|
|
# Sources
|
|
#----------------------------------------------------------------
|
|
set(dials_sources
|
|
attitude_indicator.cpp
|
|
attitude_indicator.h
|
|
cockpit_grid.cpp
|
|
cockpit_grid.h
|
|
compass_grid.cpp
|
|
compass_grid.h
|
|
dials.cpp
|
|
speedo_meter.cpp
|
|
speedo_meter.h
|
|
)
|
|
|
|
#----------------------------------------------------------------
|
|
# Target
|
|
#----------------------------------------------------------------
|
|
add_executable(qwt_example_dials ${dials_sources})
|
|
|
|
target_link_libraries(qwt_example_dials
|
|
PRIVATE
|
|
qwt
|
|
)
|
|
|
|
#----------------------------------------------------------------
|
|
# Deploy
|
|
#----------------------------------------------------------------
|
|
add_custom_command(
|
|
TARGET qwt_example_dials POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
$<TARGET_FILE:Qt5::Core> $<TARGET_FILE_DIR:qwt_example_dials>
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
$<TARGET_FILE:Qt5::Gui> $<TARGET_FILE_DIR:qwt_example_dials>
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
$<TARGET_FILE:Qt5::OpenGL> $<TARGET_FILE_DIR:qwt_example_dials>
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
$<TARGET_FILE:Qt5::PrintSupport> $<TARGET_FILE_DIR:qwt_example_dials>
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
$<TARGET_FILE:Qt5::Svg> $<TARGET_FILE_DIR:qwt_example_dials>
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
$<TARGET_FILE:Qt5::Widgets> $<TARGET_FILE_DIR:qwt_example_dials>
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
$<TARGET_FILE:qwt> $<TARGET_FILE_DIR:qwt_example_dials>
|
|
)
|