Skip to content Skip to sidebar Skip to footer

Set Up Cmakelists To Not Change The Include Statements From Tfs Project In Android Studio

From a previous question a new one have arisen. I want to include 2 native TFS project libraries stored in two different folders, dependant from each other in my Android Studio pro

Solution 1:

Add the given directories to those the compiler uses to search for include files. Relative paths are interpreted as relative to the current source directory. So you have to specify "../my_lib_path/libFile.h", that means you need to change all includes, otherwise it will not work.

Solution 2:

@Andy Li-MSFT is absolutely right! Though what worked for me in a similar project now was to set a different relative CMakeLists.txt path in the app .gradle file outside the specific Android Studio Project directory:

externalNativeBuild {
        cmake {
            path"../../whatever_path/my_C_files/CMakeLists.txt"
        }
    }

After that i was able to compile my C sources flawlessly without changing the include paths of the C project!

Post a Comment for "Set Up Cmakelists To Not Change The Include Statements From Tfs Project In Android Studio"