Skip to content

Commit

Permalink
Fix test logic
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Nov 13, 2023
1 parent 9f6c81c commit 8eba03e
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,33 +73,28 @@ set(GZ_RENDERING_VER ${gz-rendering9_VERSION_MAJOR})
gz_find_package(gz-msgs11 REQUIRED)
set(GZ_MSGS_VER ${gz-msgs11_VERSION_MAJOR})

# Find if command is available. This is used to enable tests.
# Note that CLI files are installed regardless of whether the dependency is
# available during build time
find_program(HAVE_GZ_TOOLS gz)
set(GZ_TOOLS_VER 2)

#--------------------------------------
# Find QT
gz_find_package (Qt5
VERSION 5.15
set(QT_MAJOR_VERSION 5)
set(QT_MINOR_VERSION 15)
gz_find_package (Qt${QT_MAJOR_VERSION}
VERSION ${QT_MAJOR_VERSION}.${QT_MINOR_VERSION}
COMPONENTS
Core
Quick
QuickControls2
Widgets
Test
REQUIRED
PKGCONFIG "Qt5Core Qt5Quick Qt5QuickControls2 Qt5Widgets"
)

PKGCONFIG "Qt${QT_MAJOR_VERSION}Core Qt${QT_MAJOR_VERSION}Quick Qt${QT_MAJOR_VERSION}QuickControls2 Qt${QT_MAJOR_VERSION}Widgets")
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)

if (BUILD_TESTING)
# Find if command is available. This is used to enable tests.
# Note that CLI files are installed regardless of whether the dependency is
# available during build time
find_program(HAVE_GZ_TOOLS gz)
set(GZ_TOOLS_VER 2)

find_package(Qt5 REQUIRED COMPONENTS Test)

endif()

set(GZ_GUI_PLUGIN_RELATIVE_INSTALL_DIR
${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins
)
Expand Down

0 comments on commit 8eba03e

Please sign in to comment.