--- src/CMakeLists.txt.orig	2025-03-07 00:50:44 UTC
+++ src/CMakeLists.txt
@@ -1,5 +1,5 @@
 
-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+if(NOT BlocksRuntime_FOUND)
   add_subdirectory(BlocksRuntime)
 endif()
 
@@ -145,7 +145,7 @@ target_compile_options(dispatch PRIVATE -fblocks)
 # FIXME(compnerd) add check for -fblocks?
 target_compile_options(dispatch PRIVATE -fblocks)
 
-check_c_compiler_flag("-momit-leaf-frame-pointer -Werror -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
+check_c_compiler_flag("-momit-leaf-frame-pointer -Wall" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
 if (C_SUPPORTS_OMIT_LEAF_FRAME_POINTER)
   target_compile_options(dispatch PRIVATE -momit-leaf-frame-pointer)
 endif()
@@ -176,6 +176,10 @@ if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
 
 if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
   set_target_properties(dispatch PROPERTIES INSTALL_RPATH "$ORIGIN")
+  set_target_properties(dispatch PROPERTIES
+        VERSION ${PROJECT_VERSION}
+        SOVERSION ${PROJECT_VERSION_MAJOR}
+        EXPORT_NAME dispatch )
 endif()
 
 if(LINKER_SUPPORTS_BUILD_ID)
