32 |
32 |
33 set(ANDROID_NDK /home/richard/SoftDev/android/android-ndk-r5b) |
33 set(ANDROID_NDK /home/richard/SoftDev/android/android-ndk-r5b) |
34 set(ANDROID_SDK /home/richard/SoftDev/android/android-sdk-linux_86) |
34 set(ANDROID_SDK /home/richard/SoftDev/android/android-sdk-linux_86) |
35 set(FPC_DIR /home/richard/SoftDev/fpc-2.4.4) |
35 set(FPC_DIR /home/richard/SoftDev/fpc-2.4.4) |
36 set(SDL_DIR /home/richard/Downloads/android-project) |
36 set(SDL_DIR /home/richard/Downloads/android-project) |
37 set(LUA_DIR /home/richard/Downloads/lua.5.1.4) |
37 set(LUA_DIR /home/richard/Downloads/lua-5.1.4) |
38 |
38 |
39 if(ANDROID_NDK AND ANDROID_SDK AND FPC_DIR) |
39 if(ANDROID_NDK AND ANDROID_SDK AND FPC_DIR) |
40 |
40 |
41 set(ANDROID_SDK_API_LVL 8) |
41 set(ANDROID_SDK_API_LVL 8) |
42 set(ANDROID_NDK_API_LVL 5) |
42 set(ANDROID_NDK_API_LVL 5) |
63 mikmod |
63 mikmod |
64 tremor |
64 tremor |
65 freetype |
65 freetype |
66 ) |
66 ) |
67 foreach(DIR ${DirsToCopy}) |
67 foreach(DIR ${DirsToCopy}) |
68 EXECUTE_PROCESS( |
68 exec_program( |
69 COMMAND ${CMAKE_COMMAND} |
69 ${CMAKE_COMMAND} |
70 -E copy_directory |
70 ARGS -E copy_directory |
71 ${SDL_DIR}/jni/${DIR} |
71 ${SDL_DIR}/jni/${DIR} |
72 ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/${DIR} |
72 ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/${DIR} |
73 ) |
73 ) |
|
74 MESSAGE("Moved ${DIR}") |
74 endforeach(DIR) |
75 endforeach(DIR) |
75 exec_program(${HGCOMMAND} |
76 exec_program(${HGCOMMAND} |
76 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/SDL/src/core/android/SDL_android.cpp |
77 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/SDL/src/core/android/SDL_android.cpp |
77 ) |
78 ) |
78 exec_program(${HGCOMMAND} |
79 exec_program(${HGCOMMAND} |
79 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/SDL/src/main/android/SDL_android_main.cpp |
80 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/SDL/src/main/android/SDL_android_main.cpp |
80 ) |
81 ) |
|
82 exec_program(${HGCOMMAND} |
|
83 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/SDL/src/video/android/SDL_androidtouch.c |
|
84 ) |
|
85 |
|
86 exec_program(${HGCOMMAND} |
|
87 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/SDL/src/video/android/SDL_androidtouch.h |
|
88 ) |
|
89 |
|
90 |
81 else(SDL_DIR) |
91 else(SDL_DIR) |
82 MESSAGE("Android port of SDL not moved..") |
92 MESSAGE("Android port of SDL not moved..") |
83 endif(SDL_DIR) |
93 endif(SDL_DIR) |
84 |
94 |
|
95 |
85 if(LUA_DIR) |
96 if(LUA_DIR) |
86 EXECUTE_PROCESS( |
97 MESSAGE("Moving Lua dir..") |
87 ${CMAKE_COMMAND} |
98 |
88 -E copy_directory |
99 exec_program( |
89 ${LUA_DIR}/src |
100 ${CMAKE_COMMAND} |
90 ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/lua-5.1.4 |
101 ARGS -E copy_directory |
91 ) |
102 ${LUA_DIR}/src |
|
103 ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/lua-5.1.4 |
|
104 ) |
|
105 MESSAGE("Lua has been moved.") |
|
106 |
92 exec_program(${HGCOMMAND} |
107 exec_program(${HGCOMMAND} |
93 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/lua-5.1.4/Android.mk |
108 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/lua-5.1.4/Android.mk |
94 ) |
109 ) |
95 exec_program(${HGCOMMAND} |
110 exec_program(${HGCOMMAND} |
96 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/lua-5.1.4/llex.c |
111 ARGS revert ${CMAKE_CURRENT_SOURCE_DIR}/SDL-android-project/jni/lua-5.1.4/llex.c |
97 ) |
112 ) |
98 MESSAGE("Lua has been moved.") |
|
99 else(LUA_DIR) |
113 else(LUA_DIR) |
100 MESSAGE("Lua hasn't been moved..") |
114 MESSAGE("Lua hasn't been moved..") |
101 endif(LUA_DIR) |
115 endif(LUA_DIR) |
102 |
116 |
103 else(ANDROID_AND AND ANDROID_SDK AND FPC_DIR) |
117 else(ANDROID_AND AND ANDROID_SDK AND FPC_DIR) |
104 MESSAGE("Android port files not created, edit top of ${CMAKE_CURRENT_SOURCE_DIR}/CMakeList.txt to created android specific files") |
118 MESSAGE("Android port files not created, edit top of ${CMAKE_CURRENT_SOURCE_DIR}/CMakeList.txt to create android specific files") |
105 endif(ANDROID_NDK AND ANDROID_SDK AND FPC_DIR) |
119 endif(ANDROID_NDK AND ANDROID_SDK AND FPC_DIR) |
106 |
120 |
107 |
121 |