diff --git a/CMakeLists.txt b/CMakeLists.txt
index 37dfc9d..8eef913 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,6 +109,9 @@ if (NOT MSVC)
endif()
if (APPLE)
+ set(CMAKE_MACOSX_RPATH 1)
+ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+
set(CMAKE_C_FLAGS "-I/usr/local/include ${CMAKE_C_FLAGS}")
link_directories("/usr/local/lib")
endif()
diff --git a/src/builder/CMakeLists.txt b/src/builder/CMakeLists.txt
index 5fb1500..f1aba7b 100644
--- a/src/builder/CMakeLists.txt
+++ b/src/builder/CMakeLists.txt
@@ -24,6 +24,16 @@ if (requirements)
add_executable(${SUB} ${SRCS})
if (APPLE)
set_property(TARGET ${SUB} PROPERTY MACOSX_RPATH YES)
+ set(CMAKE_MACOSX_RPATH 1)
+ set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+
+ add_custom_command(TARGET ${SUB}
+ POST_BUILD COMMAND
+ ${CMAKE_INSTALL_NAME_TOOL} -add_rpath "/usr/local/lib"
+ $<TARGET_FILE:${SUB}>)
+
+ set(CMAKE_C_FLAGS "-I/usr/local/include ${CMAKE_C_FLAGS}")
+ link_directories("/usr/local/lib")
endif()
#
diff --git a/src/server/s-task.c b/src/server/s-task.c
index 9c90bfd..9a71351 100644
--- a/src/server/s-task.c
+++ b/src/server/s-task.c
@@ -340,7 +340,7 @@ sais_task_pending(struct vhd *vhd, struct pss *pss, const char *platform)
n = lws_struct_sq3_deserialize(vhd->server.pdb, pf, "created desc ",
lsm_schema_sq3_map_event, &o, &ac, 0, 10);
if (n < 0 || !o.count) {
- lwsl_notice("%s: platform %s: bail1: n %d count %d\n", __func__, platform, n, o.count);
+ // lwsl_notice("%s: platform %s: bail1: n %d count %d\n", __func__, platform, n, o.count);
goto bail;
}