project_files/Android-build/CMakeLists.txt
author Xeli
Tue, 05 Jul 2011 18:27:18 +0200
branchhedgeroid
changeset 5397 4ae1b082e4ba
parent 5381 8f95038f3f75
child 5408 1c2f0dfbe759
permissions -rw-r--r--
Added download functionality and changed some icons
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5381
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     1
set(ANDROID_NDK /home/richard/SoftDev/android/android-ndk-r5b)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     2
set(ANDROID_SDK /home/richard/SoftDev/android/android-sdk-linux_86)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     3
set(FPC_DIR /home/richard/SoftDev/fpc-2.4.4)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     4
set(ANDROID_SDK_API_LVL 8)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     5
set(ANDROID_NDK_API_LVL 5)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     6
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     7
configure_file(Templates/complete_build.sh .)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     8
configure_file(Templates/default.properties SDL-android-project/)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
     9
configure_file(Templates/local.properties SDL-android-project/)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    10
configure_file(Templates/default.properties DataPackage/)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    11
configure_file(Templates/local.properties DataPackage/)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    12
configure_file(Templates/Makefile.android .)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    13
configure_file(Templates/pushToDevice.sh .)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    14
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    15
set(PREFERED_DIRS 
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    16
    Sounds
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    17
    Music
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    18
)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    19
set(DIRS
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    20
    Fonts
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    21
    Forts
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    22
    Graphics
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    23
    Locale
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    24
    Maps
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    25
    misc
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    26
    Missions
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    27
    Names
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    28
    Scripts
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    29
    Themes
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    30
)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    31
set(PREFERED_DIRS_PREFIX ../../../../Data)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    32
set(DIRS_PREFIX ../../../../../share/hedgewars/Data)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    33
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    34
if(CMAKE_HOST_WIN32) #Copy the asset files to the proper folder when using windows
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    35
    set(OPERATION copy_directory)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    36
else(CMAKE_HOST_WIN32)#If it isn't windows we can assume it's unix/darwin which supports symlinks
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    37
    set(OPERATION create_symlink)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    38
endif(CMAKE_HOST_WIN32)#We can make the above assumption because the android ndk/sdk only support Linux/Windows/Mac
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    39
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    40
#Copy or symlink the smaller sized resources first
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    41
foreach(DIR ${PREFERED_DIRS})
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    42
        EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    43
            -E 
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    44
            ${OPERATION}
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    45
            ${PREFERED_DIRS_PREFIX}/${DIR}
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    46
            DataPackage/assets/Data/${DIR} 
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    47
            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    48
        )
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    49
endforeach(DIR)
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    50
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    51
#Use the global resources second
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    52
foreach(DIR ${DIRS})
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    53
         EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}"
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    54
            -E 
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    55
            ${OPERATION} 
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    56
            ${DIRS_PREFIX}/${DIR}
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    57
            DataPackage/assets/Data/${DIR} 
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    58
            WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    59
         )
8f95038f3f75 Removed protocol check, using CMake now to setup the building scripts using Templates/* removed old scripts
Xeli
parents:
diff changeset
    60
endforeach(DIR)