KhronosGroup / COLLADA2GLTF

COLLADA to glTF converter
Other
532 stars 156 forks source link

COLLADA2GLTF cant be compiled on windows using ninja #273

Closed orion160 closed 3 years ago

orion160 commented 3 years ago

It is not possible to use cmake to generate ninja projects to compile COLLADA2GLTF possibly by the naming length.

MSVC cmake generator logs

1> CMake generation started for configuration: 'x64-Release_msvc'.
1> Found and using vcpkg toolchain file (C:/dev/repos/vcpkg/scripts/buildsystems/vcpkg.cmake).
1> Command line: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Visual Studio 16 2019" -A x64  -DCMAKE_CONFIGURATION_TYPES:STRING="Release" -DCMAKE_INSTALL_PREFIX:PATH="C:\dev\repos\COLLADA2GLTF\out\install\x64-Release_msvc"  -DCMAKE_TOOLCHAIN_FILE="C:/dev/repos/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\dev\repos\COLLADA2GLTF" 2>&1"
1> Working directory: C:\dev\repos\COLLADA2GLTF\out\build\x64-Release_msvc
1> [CMake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/dev/repos/COLLADA2GLTF/out/build/x64-Release_msvc
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted includes paths.
1> CMake generation finished.

ninja cmake generator logs:

1> CMake generation started for configuration: 'x64-Release-ninja'.
1> Found and using vcpkg toolchain file (C:/dev/repos/vcpkg/scripts/buildsystems/vcpkg.cmake).
1> Command line: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:\dev\repos\COLLADA2GLTF\out\install\x64-Release-ninja" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe"  -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" -DCMAKE_TOOLCHAIN_FILE="C:/dev/repos/vcpkg/scripts/buildsystems/vcpkg.cmake" "C:\dev\repos\COLLADA2GLTF" 2>&1"
1> Working directory: C:\dev\repos\COLLADA2GLTF\out\build\x64-Release-ninja
1> [CMake] -- Configuring done
1> [CMake] CMake Warning in dependencies/OpenCOLLADA/modules/COLLADASaxFrameworkLoader/CMakeLists.txt:
1> [CMake]   The object file directory
1> [CMake] 
1> [CMake]     C:/dev/repos/COLLADA2GLTF/out/build/x64-Release-ninja/dependencies/OpenCOLLADA/modules/COLLADASaxFrameworkLoader/CMakeFiles/COLLADASaxFrameworkLoader.dir/./
1> [CMake] 
1> [CMake]   has 156 characters.  The maximum full path to an object file is 250
1> [CMake]   characters (see CMAKE_OBJECT_PATH_MAX).  Object file
1> [CMake] 
1> [CMake]     __/__/OpenCOLLADA/COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLColladaParserAutoGen14PrivateFunctionMapFactory.cpp.obj
1> [CMake] 
1> [CMake]   cannot be safely placed under this directory.  The build may not work
1> [CMake]   correctly.
1> [CMake] 
1> [CMake] 
1> [CMake] CMake Warning in dependencies/OpenCOLLADA/modules/COLLADASaxFrameworkLoader/GeneratedSaxParser/CMakeLists.txt:
1> [CMake]   The object file directory
1> [CMake] 
1> [CMake]     C:/dev/repos/COLLADA2GLTF/out/build/x64-Release-ninja/dependencies/OpenCOLLADA/modules/COLLADASaxFrameworkLoader/GeneratedSaxParser/CMakeFiles/GeneratedSaxParser.dir/./
1> [CMake] 
1> [CMake]   has 168 characters.  The maximum full path to an object file is 250
1> [CMake]   characters (see CMAKE_OBJECT_PATH_MAX).  Object file
1> [CMake] 
1> [CMake]     __/__/__/OpenCOLLADA/GeneratedSaxParser/src/GeneratedSaxParserRawUnknownElementHandler.cpp.obj
1> [CMake] 
1> [CMake]   cannot be safely placed under this directory.  The build may not work
1> [CMake]   correctly.
1> [CMake] 
1> [CMake] 
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/dev/repos/COLLADA2GLTF/out/build/x64-Release-ninja
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted includes paths.
1> CMake generation finished.
orion160 commented 3 years ago

It seems that it is problem of ninja, i changed the project to C:/ and it works