How to get android build type (debug, release) as a variable in CMakeLists.txt file for external built-in build in android studio?

I need to reference the android build type (debug, release) in the CMakeLists.txt file that I use to create an external library. More precisely:

set_target_properties( # Specifies the target library.
                   mylibname

                   # Specifies the parameter you want to define.
                   PROPERTIES IMPORTED_LOCATION

                   # Provides the path to the library you want to import.                                                            

                   $ENV{LIBRARY_HOME}/${ANDROID_BUILD_TYPE}/libs/${ANDROID_ABI}/libMylib.a

I need the equivalent of $ {ANDROID_ABI}, which changes the assembly type to type abi instead of $ {ANDROID_BUILD_TYPE}, which of course is the name of the example. That is: what is the name of this variable? And, more generally, is there a list of them somewhere?

+4
source share

Source: https://habr.com/ru/post/1674763/


All Articles