Set the dylib rpath relative to the executable in test.
@@ -2,7 +2,14 @@ cmake_minimum_required(VERSION 2.8.12)
project(PackageTest CXX)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-conan_basic_setup()
+conan_basic_setup(KEEP_RPATHS)
+
+if (APPLE)
+ set(CMAKE_INSTALL_RPATH "@executable_path")
+else()
+ set(CMAKE_INSTALL_RPATH "$ORIGIN")
+endif()
+set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
add_executable(unittest catch.cpp unittest.cpp)
target_link_libraries(unittest ${CONAN_LIBS})
