CMake targeting Android with "Visual Studio 15 2017" generator issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CMake targeting Android with "Visual Studio 15 2017" generator issue

Bruce Elliott
We are trying to port a C++/OpenGL project from MS Windows to Android. The
project is using CMake to generate solution and project files for Visual
Studio 2017. All attempts to create solution and project files for VS2017
when targeting Android have failed with the CMake GUI generating the
following error message:

>CMake Error at CMakeLists.txt:100 (project):
>  CMAKE_SYSTEM_NAME is 'Android' but 'NVIDIA Nsight Tegra Visual Studio
>  Edition' is not installed.
>
>Configuring incomplete, errors occurred!
>See also
"C:/SVN/Nexus_Android/Build_Android_vs2017/CMakeFiles/CMakeOutput.log".

Line 100 of the CMakeLists.txt is:
    "project(${PROJECT_NAME} C CXX)"

The log file contains:
   The target system is: Android - 23 -
   The host system is: Windows - 10.0.16299 - AMD64

I have tried toolchain files from OpenCV, Taka-No-Me as well as a simple
toolchain file as follows:

set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 23) # API level
set(CMAKE_ANDROID_API 23)
set(CMAKE_ANDROID_API_MIN 16)
set(CMAKE_ANDROID_NDK C:/ProgramData/Microsoft/AndroidNDK/android-ndk-r15c)
set(CMAKE_ANDROID_ARCH arm64-v8a)
set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)

All result in the CMake GUI generating the error above.

I have created a Native-Activity Application(Android) test project in VS2017
and have been able to build/deploy/debug the native C++ on both emulated
targets for Android and a USB connected Android tablet target. VS2017 does
not require ''NVIDIA Nsight Tegra Visual Studio Edition'. Is there a work
around for CMake to get it to generate native C++ Android projects for
VS2017?

Tool versions being used:
Visual Studio 15 2017
CMake 3.10.0-rc3
Android NDK  r15c


Regards,
Bruce Elliott

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: CMake targeting Android with "Visual Studio 15 2017" generator issue

Dvir Yitzchaki

There was a CMake fork by Microsoft for generating VS 2015 Android projects (see here) but it seems it was discontinued.

 

Regards,

Dvir

 

 

-----Original Message-----
From: CMake [mailto:[hidden email]] On Behalf Of Bruce Elliott
Sent: Friday, November 3, 2017 18:27
To: [hidden email]
Subject: [CMake] CMake targeting Android with "Visual Studio 15 2017" generator issue

 

We are trying to port a C++/OpenGL project from MS Windows to Android. The project is using CMake to generate solution and project files for Visual Studio 2017. All attempts to create solution and project files for VS2017 when targeting Android have failed with the CMake GUI generating the following error message:

 

>CMake Error at CMakeLists.txt:100 (project):

>  CMAKE_SYSTEM_NAME is 'Android' but 'NVIDIA Nsight Tegra Visual Studio

>  Edition' is not installed.

> 

>Configuring incomplete, errors occurred!

>See also

"C:/SVN/Nexus_Android/Build_Android_vs2017/CMakeFiles/CMakeOutput.log".

 

Line 100 of the CMakeLists.txt is:

    "project(${PROJECT_NAME} C CXX)"

 

The log file contains:

   The target system is: Android - 23 -

   The host system is: Windows - 10.0.16299 - AMD64

 

I have tried toolchain files from OpenCV, Taka-No-Me as well as a simple toolchain file as follows:

 

set(CMAKE_SYSTEM_NAME Android)

set(CMAKE_SYSTEM_VERSION 23) # API level set(CMAKE_ANDROID_API 23) set(CMAKE_ANDROID_API_MIN 16) set(CMAKE_ANDROID_NDK C:/ProgramData/Microsoft/AndroidNDK/android-ndk-r15c)

set(CMAKE_ANDROID_ARCH arm64-v8a)

set(CMAKE_ANDROID_ARCH_ABI arm64-v8a)

 

All result in the CMake GUI generating the error above.

 

I have created a Native-Activity Application(Android) test project in VS2017 and have been able to build/deploy/debug the native C++ on both emulated targets for Android and a USB connected Android tablet target. VS2017 does not require ''NVIDIA Nsight Tegra Visual Studio Edition'. Is there a work around for CMake to get it to generate native C++ Android projects for VS2017?

 

Tool versions being used:

Visual Studio 15 2017

CMake 3.10.0-rc3

Android NDK  r15c

 

 

Regards,

Bruce Elliott

 

--

 

Powered by www.kitware.com

 

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

 

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

 

CMake Support: http://cmake.org/cmake/help/support.html

CMake Consulting: http://cmake.org/cmake/help/consulting.html

CMake Training Courses: http://cmake.org/cmake/help/training.html

 

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

 

Follow this link to subscribe/unsubscribe:

http://public.kitware.com/mailman/listinfo/cmake


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake