android-project/build.gradle
author Sam Lantinga
Fri, 20 Mar 2020 12:13:26 -0700
changeset 13648 1631ba283bc4
parent 12364 351a67dbe9c6
permissions -rw-r--r--
Fixed bug 5044 - CMake messes up hidapi path when project directory contains spaces

Eric Jing

When the project directory path contains spaces, CMake butchers the include path for the hidapi files.

I traced the problem to the cmake/sdlchecks.cmake file at line 1091, which sets flags for the build process. I surrounded the problem flag with double quotes, shown below, and CMake works with spaces in the project directory path.
     1 // Top-level build file where you can add configuration options common to all sub-projects/modules.
     2 
     3 buildscript {
     4     repositories {
     5         jcenter()
     6         google()
     7     }
     8     dependencies {
     9         classpath 'com.android.tools.build:gradle:3.2.0'
    10 
    11         // NOTE: Do not place your application dependencies here; they belong
    12         // in the individual module build.gradle files
    13     }
    14 }
    15 
    16 allprojects {
    17     repositories {
    18         jcenter()
    19         google()
    20     }
    21 }
    22 
    23 task clean(type: Delete) {
    24     delete rootProject.buildDir
    25 }