Build on MacOS10.15

I am having difficulty building Slicer. My system configuration is as follows

MacBook Pro 2017 , 2.3 GHz Dual-Core Intel Core i5
MacOS. 10.15.1
Xcode 11.2

After cloning slicer, I execute the following commands in a terminal window

mkdir DebugXcode
cd DebugXcode
cmake -Xcode -DCMAKE_BUILD_TYPE:STRING=DEBUG -DQt5_DIR:PATH=/Users/radiosp/Development/Qt/5.11.2/clang_64/lib/cmake/Qt5 -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF …

CMake ran to completion w/o errors or warnings. I then opened the Slicer.xcodeproj file and selected the build icon. After about 30 min the build crapped out during the python build with the following error

cd /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin && env DYLD_LIBRARY_PATH=/Users/radiosp/Development/Slicer/DebugXcode/python-build/lib /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/Release/python -E -S -m sysconfig --generate-posix-vars
dyld: Library not loaded: /Users/radiosp/Development/Slicer/DebugXcode/python-install/lib/libpython3.6m.dylib
Referenced from: /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/Release/python
Reason: image not found
/bin/sh: line 1: 91877 Abort trap: 6 env DYLD_LIBRARY_PATH=/Users/radiosp/Development/Slicer/DebugXcode/python-build/lib /Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/Release/python -E -S -m sysconfig --generate-posix-vars
make[1]: *** [/Users/radiosp/Development/Slicer/DebugXcode/python-build/bin/pybuilddir.txt] Error 134
Command /bin/sh failed with exit code 2

Apparently it is looking for a library in the python-install directory which does not exist at this point.

Please advise

I’ve never tried Slicer with the cmake Xcode generator. If you just use the default Makefiles and then use make to build it should work. You can still use Xcode for debugging.

Here’s an example command I use:

cmake \
	-DCMAKE_BUILD_TYPE:STRING=Debug \
	-DQt5_VERSION:STRING=5.12 \
	-DSlicer_REQUIRED_QT_VERSION:STRING=5.12 \
	-DQt5_DIR:PATH=/usr/local/opt/qt5/lib/cmake/Qt5 \
	-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.14 \
	../Slicer