Build the VSG Native Activity example with Android Studio
masterFollow these steps to import and configure the project in Android Studio:
- Import Project: Open Android Studio and select 'Import Project', then select the
vsgandroidnativefolder. - Configure VSG Path: Open
/app/cpp/CMakeLists.txtand locate thefind vsgsection. You must provide the path to your VulkanSceneGraph installation using one of the following two methods:- Method A (Subdirectory): Use
add_subdirectory( /path/to/VulkanSceneGraph vsg ). - Method B (Package Find): Use
find_package( vsg REQUIRED NO_CMAKE_FIND_ROOT_PATH ). If you use this method, you must also update yourbuild.gradlefile to pass the installation directory via the following flag:-Dvsg_DIR=/path/to/vsg/android/installation.
- Method A (Subdirectory): Use
- Build: Run the standard build process in Android Studio.
# Option A: Subdirectory approach
add_subdirectory( /path/to/VulkanSceneGraph vsg )
# OR
# Option B: Package approach (requires build.gradle update)
find_package( vsg REQUIRED NO_CMAKE_FIND_ROOT_PATH )