Android Native Executable?

Discussion in 'Android' started by gudenau, Jul 7, 2017.

  1. gudenau
    OP

    gudenau Never a unique idea

    Member
    3,257
    1,224
    Jul 7, 2010
    United States
    /dev/random
    How could I make an Android application come with an executable in the assets? When I build my project the natives do not show up in the assets folder at all.

    My CMakeLists.txt file.
    Code:
    cmake_minimum_required(VERSION 3.4.1)
    
    
    set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/main/assets/${ANDROID_ABI}")
    
    add_executable(native-test src/main/natives/source/test.c)
    
    include_directories(src/main/natives/include/)
    
    My test.c.
    Code:
    //
    // Created by gudenau on 7/5/2017.
    //
    
    #include <stdio.h>
    
    int main(int argc, char ** argv){
       printf("Hello world!\n");
       return 0;
    }