OpenSubdiv
OpenSubdiv copied to clipboard
Cmake Building for android fails
trafficstars
I am trying to build OSD for android on windows and I am getting the following error.
-- Compiling OpenSubdiv version v3_3_3
-- Using cmake version 3.6.0-rc2
-- Configuring done
CMake Error at CMakeLists.txt:715 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:osd_gpu_obj>
Objects of target "osd_gpu_obj" referenced but no such target exists.
Call Stack (most recent call first):
opensubdiv/CMakeLists.txt:170 (_add_possibly_cuda_library)
CMake Error at CMakeLists.txt:715 (add_library):
Error evaluating generator expression:
$<TARGET_OBJECTS:osd_gpu_obj>
Objects of target "osd_gpu_obj" referenced but no such target exists.
Call Stack (most recent call first):
opensubdiv/CMakeLists.txt:224 (_add_possibly_cuda_library)
CMake Error: CMake can not determine linker language for target: osd_static_gpu
CMake Error: CMake can not determine linker language for target: osd_dynamic_gpu
-- Generating done
-- Build files have been written to: C:/Users/admin/Sync/opensubdiv/src/opensubdiv-build-android-test
I am using the following cmake command
C:\Users\admin\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake -G "Android Gradle - Ninja" -DCMAKE_TOOLCHAIN_FILE=C:/Users/admin/AppData/Local/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DLIBRARY_OUTPUT_PATH_ROOT=Lib_out -DCMAKE_SYSROOT=C:/Users/admin/AppData/Local/Android/Sdk/ndk-bundle/sysroot -DANDROID_PLATFORM=android-24 -DNO_EXAMPLES=1 -DNO_TUTORIALS=1 -DNO_REGRESSION=1 -DNO_PTEX=1 -DNO_DOC=1 -DNO_OMP=1 -DNO_TBB=1 -DNO_CUDA=1 -DNO_OPENCL=1 -DNO_OPENGL=1 -DNO_CLEW=1 -DNO_METAL=1 -DNO_DX=1 -DNO_TESTS=1 -DNO_GLTESTS=1 -DNO_GLFW_X11=1 -DNO_GLFW=1 ..\opensubdiv
I get the same error if I do the process with android studio
Filed as internal issue #OSD-227.