project_files/Android-build/CMakeLists.txt
branchhedgeroid
changeset 6340 9dd921c0c7e7
parent 6230 de1e43054017
child 6589 2fa0a274a1e3
equal deleted inserted replaced
6338:633af6fec34f 6340:9dd921c0c7e7
    20 
    20 
    21 if(NOT ANDROID_NDK)
    21 if(NOT ANDROID_NDK)
    22     find_path(ANDROID_NDK ndk-build)
    22     find_path(ANDROID_NDK ndk-build)
    23 endif()
    23 endif()
    24 
    24 
    25 if(IS_DIRECTORY ${ANDROID_NDK})
    25 if(IS_DIRECTORY "${ANDROID_NDK}")
    26     MESSAGE(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK}) 
    26     MESSAGE(STATUS "Detected the android NDK directory at: " ${ANDROID_NDK}) 
    27 else ()
    27 else ()
    28     MESSAGE(FATAL_ERROR "Couldn't detect the Android NDK directory")
    28     MESSAGE(FATAL_ERROR "Couldn't detect the Android NDK directory")
    29 endif()
    29 endif()
    30 
    30 
    31 if(NOT ANDROID_SDK)#Check if its defined at the cmdline
    31 if(NOT ANDROID_SDK)#Check if its defined at the cmdline
    32     find_path(ANDROID_SDK adb ) #assume they've added platform-tools to their path
    32     find_path(ANDROID_SDK adb ) #assume they've added platform-tools to their path
    33     get_filename_component(ANDROID_SDK ${ANDROID_SDK} PATH)
    33     get_filename_component(ANDROID_SDK "${ANDROID_SDK}" PATH)
    34     set(ANDROID_SDK ${ANDROID_SDK} CACHE PATH "Path to the android sdk" FORCE)
    34     set(ANDROID_SDK "${ANDROID_SDK}" CACHE PATH "Path to the android sdk" FORCE)
    35 endif()
    35 endif()
    36 
    36 
    37 if( IS_DIRECTORY ${ANDROID_SDK})
    37 if( IS_DIRECTORY "${ANDROID_SDK}")
    38     MESSAGE(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK}) 
    38     MESSAGE(STATUS "Detected the android SDK directory at: " ${ANDROID_SDK}) 
    39 else ()
    39 else ()
    40     MESSAGE(FATAL_ERROR "Couldn't detect the Android SDK directory")
    40     MESSAGE(FATAL_ERROR "Couldn't detect the Android SDK directory")
    41 endif()
    41 endif()
    42 
    42 
    43 if( NOT FPC_DIR)
    43 if( NOT FPC_DIR)
    44     find_path(FPC_DIR ppcrossarm)
    44     find_path(FPC_DIR ppcrossarm)
    45     get_filename_component(FPC_DIR ${FPC_DIR} PATH)
    45     get_filename_component(FPC_DIR "${FPC_DIR}" PATH)
    46     set(FPC_DIR ${FPC_DIR} CACHE PATH "Path to fpc dir used in the android port" FORCE)
    46     set(FPC_DIR "${FPC_DIR}" CACHE PATH "Path to fpc dir used in the android port" FORCE)
    47 endif()
    47 endif()
    48 
    48 
    49 if( IS_DIRECTORY ${FPC_DIR})
    49 if( IS_DIRECTORY "${FPC_DIR}")
    50     MESSAGE(STATUS "Detected the FreePascal directory at: " ${FPC_DIR}) 
    50     MESSAGE(STATUS "Detected the FreePascal directory at: " "${FPC_DIR}") 
    51 else ()
    51 else ()
    52     MESSAGE(FATAL_ERROR "Couldn't detect the FreePascal directory")
    52     MESSAGE(FATAL_ERROR "Couldn't detect the FreePascal directory")
    53 endif()
    53 endif()
    54 
    54 
    55 set(SDL_DIR /home/richard/Downloads/android-project)
    55 set(SDL_DIR /home/richard/Downloads/android-project)