Skip to content

Commit

Permalink
set test dll runtime output to CATKIN_PACKAGE_BIN_DESTINATION on Wind…
Browse files Browse the repository at this point in the history
…ows (#113)

* set the test dll runtime output to lib

Set the test dll runtime output to CATKIN_PACKAGE_BIN_DESTINATION to match default

Revert "Set the test dll runtime output to CATKIN_PACKAGE_BIN_DESTINATION to match default"

This reverts commit 7c2cd4a.

set the test dll runtime output to lib

* Set the test dll runtime output to CATKIN_PACKAGE_BIN_DESTINATION to match default


Co-authored-by: Johnson Shih <jshih@microsoft.com>
  • Loading branch information
2 people authored and nuclearsandwich committed Mar 29, 2019
1 parent 6b1825c commit a183b76
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@ include_directories(${catkin_INCLUDE_DIRS})

add_library(${PROJECT_NAME}_TestPlugins1 EXCLUDE_FROM_ALL plugins1.cpp)
target_link_libraries(${PROJECT_NAME}_TestPlugins1 ${PROJECT_NAME})
if(WIN32)
# On Windows, default library runtime output set to CATKIN_GLOBAL_BIN_DESTINATION,
# change it back to CATKIN_PACKAGE_BIN_DESTINATION so the test can run correctly
set_target_properties(${PROJECT_NAME}_TestPlugins1 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})
endif()
class_loader_hide_library_symbols(${PROJECT_NAME}_TestPlugins1)
add_library(${PROJECT_NAME}_TestPlugins2 EXCLUDE_FROM_ALL plugins2.cpp)
target_link_libraries(${PROJECT_NAME}_TestPlugins2 ${PROJECT_NAME})
if(WIN32)
# On Windows, default library runtime output set to CATKIN_GLOBAL_BIN_DESTINATION,
# change it back to CATKIN_PACKAGE_BIN_DESTINATION so the test can run correctly
set_target_properties(${PROJECT_NAME}_TestPlugins2 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})
endif()
class_loader_hide_library_symbols(${PROJECT_NAME}_TestPlugins2)

catkin_add_gtest(${PROJECT_NAME}_utest utest.cpp)
Expand Down

0 comments on commit a183b76

Please sign in to comment.