It is possible to set via command line as well. I'm triggering the xcodebuild command from a shell script, where you can do:
xcodebuild HEADER_SEARCH_PATHS="\$(TARGET_BUILD_DIR)/usr/local/lib/include \$(OBJROOT)/UninstalledProducts/include \$(OBJROOT)/UninstalledProducts/\$(PLATFORM_NAME)/include \$(BUILT_PRODUCTS_DIR)"
Notice that I had to escape $
The paths I've taken from the latest in