diff --git a/src/tools/idlc/xtests/Compile.cmake b/src/tools/idlc/xtests/Compile.cmake index a3bd5c1237..17f939b594 100644 --- a/src/tools/idlc/xtests/Compile.cmake +++ b/src/tools/idlc/xtests/Compile.cmake @@ -52,6 +52,9 @@ else() set(ENV{LIBRARY_PATH} "$ENV{LIBRARY_PATH}:$ENV{CDDS_LIB_PATH}") set(_output_flag "-o") set(_lib_path "") + if(APPLE) + list(APPEND _lib_path "-rpath" "$ENV{CDDS_LIB_PATH}") + endif() set(_lib "-lddsc") set(_fdbg "-g") set(_fwarn "-Wall") @@ -141,4 +144,4 @@ foreach(_source ${_sources}) message(FATAL_ERROR "Test failed ${_source}: ${_result} ${_error}") endif() -endforeach() \ No newline at end of file +endforeach()