diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f83b2532..d55743e38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,9 +42,8 @@ gz_find_package(gz-common5 REQUIRED_BY heightmap mesh dartsim tpe tpelib bullet) set(GZ_COMMON_VER ${gz-common5_VERSION_MAJOR}) -if(BUILD_TESTING) - gz_find_package(gz-common5 COMPONENTS testing) -endif() +# This is only used for test support +gz_find_package(gz-common5 COMPONENTS testing) #-------------------------------------- # Find gz-math diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d8fcf6f5b..47dbfe30f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -25,9 +25,9 @@ target_compile_definitions(gz-physics-test INTERFACE "TESTING_PROJECT_SOURCE_DIR=\"${PROJECT_SOURCE_DIR}\"" ) target_link_libraries(gz-physics-test INTERFACE - gz-plugin${GZ_PLUGIN_VER}::loader - gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER} - gz-common${GZ_COMMON_VER}::testing + gz-plugin${GZ_PLUGIN_VER}::loader + gz-common${GZ_COMMON_VER}::gz-common${GZ_COMMON_VER} + gz-common${GZ_COMMON_VER}::testing ) add_subdirectory(gtest_vendor)