project_files/Android-build/CMakeLists.txt
changeset 6589 2fa0a274a1e3
parent 6340 9dd921c0c7e7
child 6590 5f15b4026b19
equal deleted inserted replaced
6588:58c04b8c6aee 6589:2fa0a274a1e3
    53 endif()
    53 endif()
    54 
    54 
    55 set(SDL_DIR /home/richard/Downloads/android-project)
    55 set(SDL_DIR /home/richard/Downloads/android-project)
    56 
    56 
    57 
    57 
    58 set(ANDROID_SDK_API_LVL 8)
    58 set(ANDROID_SDK_API_LVL 14)
    59 set(ANDROID_NDK_API_LVL 5)
    59 set(ANDROID_NDK_API_LVL 5)
    60 
    60 
    61 MESSAGE(STATUS "Creating android scripts and configuration files")
    61 MESSAGE(STATUS "Creating Makefile.android...")
    62 
    62 
    63 configure_file(Templates/complete_build.sh .)
       
    64 configure_file(Templates/default.properties SDL-android-project/)
       
    65 configure_file(Templates/local.properties SDL-android-project/)
       
    66 configure_file(Templates/Makefile.android .)
    63 configure_file(Templates/Makefile.android .)
    67 configure_file(Templates/pushToDevice.sh .)
    64 
       
    65 find_program(ANDROID android "${ANDROID_SDK}" "${ANDROID_SDK}/tools")
       
    66 if(ANDROID)
       
    67     exec_program(${ANDROID}
       
    68                  ARGS "update project"
       
    69                  "--path ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project"
       
    70                  "--target android-${ANDROID_SDK_API_LVL}"
       
    71                  OUTPUT_VARIABLE dontcare
       
    72                 ) 
       
    73 endif(ANDROID)
    68 
    74 
    69 if(SDL_DIR_TEMP_DISABLE)
    75 if(SDL_DIR_TEMP_DISABLE)
    70     MESSAGE("Moving Android port of SDL to the proper directories")
    76     MESSAGE("Moving Android port of SDL to the proper directories")
    71     set(DirsToCopy
    77     set(DirsToCopy
    72         SDL
    78         SDL