dylib is not created from object library
Shared DYLIB doesn't get created with Xcode generator. However, with other generators such as Ninja or Make it gets created. It is also created if built directly from sources.
project(simple)
add_library(${PROJECT_NAME} OBJECT
src/foo.cpp
)
set_target_properties(${PROJECT_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_library(${PROJECT_NAME}_shared SHARED
$<TARGET_OBJECTS:${PROJECT_NAME}>
)
cmake -GXcode ..
xcodebuild
cmake version 3.6.0 xcode Version 8.1 (8B62) os 10.12 macOS Sierra