Skip to content

Commit

Permalink
Install COMMON_TEST_* executables to libexec
Browse files Browse the repository at this point in the history
Also build the test_lib_loader as static library since the
tests link against it.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Dec 2, 2022
1 parent 42aec9e commit 79b5727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/common_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ set(tests
world_features
)

set(TEST_INSTALL_DIR ${CMAKE_INSTALL_LIBEXECDIR}/gz/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}/)

function(configure_common_test PHYSICS_ENGINE_NAME test_name)
add_test(NAME ${test_name}_${PHYSICS_ENGINE_NAME}
COMMAND
Expand Down Expand Up @@ -45,6 +47,8 @@ foreach(test ${tests})
"GZ_PHYSICS_RESOURCE_DIR=\"${GZ_PHYSICS_RESOURCE_DIR}\""
)

install(TARGETS ${test_executable} DESTINATION ${TEST_INSTALL_DIR})

if (${BULLET_FOUND})
configure_common_test("bullet" ${test_executable})
configure_common_test("bullet-featherstone" ${test_executable})
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_library(${PROJECT_NAME}_test_lib_loader SHARED
add_library(${PROJECT_NAME}_test_lib_loader STATIC
TestLibLoader.cc
)
target_compile_definitions(${PROJECT_NAME}_test_lib_loader PRIVATE -DTestLibLoader_EXPORTS)
Expand Down

0 comments on commit 79b5727

Please sign in to comment.