Skip to content

Commit

Permalink
Hide qt5 functions behind test condition
Browse files Browse the repository at this point in the history
  • Loading branch information
simpsont-oci committed Nov 29, 2024
1 parent a40ccdd commit 78dcb3f
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,31 @@ if(WIN32)
list(APPEND SOURCE ddsmon.rc)
endif(WIN32)

qt_add_resources(RESOURCES ddsmon.qrc)
if (NOT Qt6_FOUND)
qt5_add_resources(RESOURCES ddsmon.qrc)
else()
qt_add_resources(RESOURCES ddsmon.qrc)
endif()

qt_wrap_cpp(MOC_SOURCE
src/graph_page.h
src/log_page.h
src/main_window.h
src/participant_page.h
src/participant_table_model.h
src/publication_monitor.h
src/recorder_dialog.h
src/subscription_monitor.h
src/table_page.h
src/topic_table_model.h
set(MOC_SOURCE_LIST
src/graph_page.h
src/log_page.h
src/main_window.h
src/participant_page.h
src/participant_table_model.h
src/publication_monitor.h
src/recorder_dialog.h
src/subscription_monitor.h
src/table_page.h
src/topic_table_model.h
)

if (NOT Qt6_FOUND)
qt5_wrap_cpp(MOC_SOURCE ${MOC_SOURCE_LIST})
else()
qt_wrap_cpp(MOC_SOURCE ${MOC_SOURCE_LIST})
endif()

add_executable(monitor
${SOURCE}
${HEADER}
Expand Down

0 comments on commit 78dcb3f

Please sign in to comment.