Xcode draco link error
The cmake documentation states
Some native build systems (such as Xcode) may not like targets that have only object files, so consider adding at least one real source file to any target that references $<TARGET_OBJECTS:objlib>.
the draco target however consists of object files only. This results in no libdraco.a or libdraco.dylib being generated and ultimately the following error in Xcode when building the ALL_BUILD target:
clang: error: no such file or directory: '/Users/mob/Desktop/draco/build/Debug/libdraco.a'
Full CMake and build output please. This is a known issue and draco (usually) handles it already.
CMake may have changed again and made this more fragile-- the draco target itself may need to be added to the list of header only targets maintained in CMakeLists.txt, but that was never the case in the past. I need to see full output from the configuration and the build before I go ahead and make that change.
Thanks for looking into this!
CMake version: 3.16.4
No changes to default cmake options
CMake output:
The C compiler identification is AppleClang 11.0.0.11000033
The CXX compiler identification is AppleClang 11.0.0.11000033
Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Found Git: /usr/bin/git (found version "2.21.1 (Apple Git-122.3)")
Configuring done
Generating done
XCode 'ALL_BUILD' target build output excerpt:
Ld build/Debug/draco_decoder normal x86_64
cd /Users/mob/Desktop/draco
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target x86_64-apple-macos10.15 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -L/Users/mob/Desktop/draco/build/Debug -F/Users/mob/Desktop/draco/build/Debug -filelist /Users/mob/Desktop/draco/build/draco.build/Debug/draco_decoder.build/Objects-normal/x86_64/draco_decoder.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/mob/Desktop/draco/build/draco.build/Debug/draco_decoder.build/Objects-normal/x86_64/draco_decoder_lto.o -Xlinker -no_deduplicate -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/mob/Desktop/draco/build/Debug/libdracodec.a -Xlinker -dependency_info -Xlinker /Users/mob/Desktop/draco/build/draco.build/Debug/draco_decoder.build/Objects-normal/x86_64/draco_decoder_dependency_info.dat -o /Users/mob/Desktop/draco/build/Debug/draco_decoder
clang: error: no such file or directory: '/Users/mob/Desktop/draco/build/Debug/libdracodec.a'
XCode 'ALL_BUILD' target build report: Build ALL_BUILD_2020-04-01T13-10-39.txt
Closing: 74dbda9 fixes this locally. Feel free to follow up here if the issue is not addressed.