diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index 1bcae748..85e1f6f5 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -28,16 +28,21 @@ if ( OPENMESH_BUILD_UNIT_TESTS ) # Create new target named unittests_hexmeshing FILE(GLOB UNITTEST_SRC *.cc) - acg_add_executable(unittests ${UNITTEST_SRC}) + # Create unittest executable + acg_add_executable(unittests ${UNITTEST_SRC}) + + # For the unittest we don't want the install rpath as set by acg_add_executable + set_target_properties ( unittests PROPERTIES BUILD_WITH_INSTALL_RPATH 0 ) + if ( NOT WIN32) - # Link against all necessary libraries - target_link_libraries(unittests OpenMeshCore OpenMeshTools ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread) + # Link against all necessary libraries + target_link_libraries(unittests OpenMeshCore OpenMeshTools ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES} pthread) - # Set output directory to ${BINARY_DIR}/Unittests - set_target_properties(unittests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Unittests) + # Set output directory to ${BINARY_DIR}/Unittests + set_target_properties(unittests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Unittests) - else() + else() # Link against all necessary libraries if ( OPENMESH_BUILD_SHARED ) #!!!! Experimental Feature!!!