From 0460f0811fbf1980f33ee5944f26cddaf432cab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Tue, 16 Jun 2015 10:57:51 +0000 Subject: [PATCH] Fixed wrong rpath in unittest binary git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1288 fdac6126-5c0c-442c-9429-916003d36597 --- src/Unittests/CMakeLists.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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!!!