File tree Expand file tree Collapse file tree 12 files changed +46
-15
lines changed Expand file tree Collapse file tree 12 files changed +46
-15
lines changed Original file line number Diff line number Diff line change @@ -69,9 +69,9 @@ $NDK/ndk-build
6969# And remove the loading part of ffmpeg&facetracker
7070$NDK /ndk-build
7171
72- # For Window user, you should include the `.cmd` extension to `ndk-build` like this:
73- cd your_path_to \a ndroid-gpuimage-plus-master \l ibrary\s rc\m ain\j ni
74- your_path_to_ndk \ n dk-bundle \n dk-build.cmd
72+ # For Windows user, you should include the `.cmd` extension to `ndk-build` like this:
73+ cd < your \p ath \t o \t his \r epo > \l ibrary\s rc\m ain\j ni
74+ < your \p ath \t o \ n dk> \n dk-build.cmd
7575
7676# Also remember to comment out these line in NativeLibraryLoader
7777//System.loadLibrary(" ffmpeg" );
Original file line number Diff line number Diff line change 88# The setting is particularly useful for tweaking memory settings.
99# Default value: -Xmx10248m -XX:MaxPermSize=256m
1010
11- org.gradle.jvmargs = -Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
11+ org.gradle.jvmargs+ = -Dfile.encoding=UTF-8
1212
1313# When configured, Gradle will run in incubating parallel mode.
1414# This option should only be used with decoupled projects. More details, visit
Original file line number Diff line number Diff line change @@ -45,14 +45,23 @@ else ()
4545 file (MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR} /../libs/${ANDROID_ABI} " )
4646endif ()
4747
48- execute_process (COMMAND find ${CMAKE_CURRENT_SOURCE_DIR} /cge -maxdepth 3 -type d OUTPUT_VARIABLE CGE_CORE_HEADER_DIR)
49- execute_process (COMMAND bash -c "find \" ${CMAKE_CURRENT_SOURCE_DIR} /cge\" -type f -iname '*.cpp' -o -iname '*.c'" OUTPUT_VARIABLE CGE_CORE_SRC)
50-
48+ if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows" )
49+ execute_process (COMMAND cmd.exe /C "dir /L /S /B /A:D"
50+ OUTPUT_VARIABLE CGE_CORE_HEADER_DIR
51+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} /cge)
52+ else ()
53+ execute_process (COMMAND find ${CMAKE_CURRENT_SOURCE_DIR} /cge -maxdepth 3 -type d OUTPUT_VARIABLE CGE_CORE_HEADER_DIR)
54+ endif ()
55+
56+ message ("CGE_CORE_HEADER_DIR=${CGE_CORE_HEADER_DIR} " )
5157string (REGEX REPLACE "\n " ";" CGE_CORE_HEADER_DIR ${CGE_CORE_HEADER_DIR} )
52- string (REGEX REPLACE "\n " ";" CGE_CORE_SRC ${CGE_CORE_SRC} )
5358
54- file (GLOB_RECURSE CGE_CORE_SRC_INTERFACE "${CMAKE_CURRENT_SOURCE_DIR} /interface/*.cpp" )
55- list (APPEND CGE_CORE_SRC ${CGE_CORE_SRC_INTERFACE} )
59+ # execute_process(COMMAND bash -c "find \"${CMAKE_CURRENT_SOURCE_DIR}/cge\" -type f -iname '*.cpp' -o -iname '*.c'" OUTPUT_VARIABLE CGE_CORE_SRC)
60+ # string(REGEX REPLACE "\n" ";" CGE_CORE_SRC ${CGE_CORE_SRC})
61+
62+ file (GLOB_RECURSE CGE_CORE_SRC "${CMAKE_CURRENT_SOURCE_DIR} /cge/*.cpp"
63+ "${CMAKE_CURRENT_SOURCE_DIR} /cge/*.c"
64+ "${CMAKE_CURRENT_SOURCE_DIR} /interface/*.cpp" )
5665
5766include_directories (
5867 ${CGE_CORE_HEADER_DIR}
Original file line number Diff line number Diff line change 44# NDK=/Users/wangyang/android_dev/android-ndk
55
66if [[ " $NDK " == " " ]]; then
7-
8- echo " Please specify the NDK variable to your ndk-dir"
9- exit
10-
7+ if command -v ndk-build; then
8+ export $NDK =$( command -v ndk-build)
9+ elif command -v ndk-build.cmd; then
10+ export $NDK =$( command -v ndk-build.cmd)
11+ else
12+ if ! command -v cmd; then
13+ function cmd() {
14+ if [[ -f " /mnt/c/Windows/system32/cmd.exe" ]]; then
15+ /mnt/c/Windows/system32/cmd.exe $@
16+ fi
17+ }
18+ fi
19+
20+ echo " command -v cmd=$( command -v cmd) "
21+
22+ if [[ -z " $( command -v cmd & > /dev/null && cmd /C set | grep -i ' NDK' ) " ]]; then
23+ echo " Please specify the NDK variable to your ndk-dir"
24+ exit
25+ fi
26+ fi
1127fi
1228
1329cd $( dirname $0 )
@@ -71,4 +87,10 @@ if [[ -z "$THREADS" ]] || [[ "$THREADS" -eq "0" ]]; then
7187 THREADS=8
7288fi
7389
74- $NDK /ndk-build ${BUILD_ARG} -j${THREADS}
90+ if [[ -n " $NDK " ]] && [[ -f " $NDK /ndk-build" ]]; then
91+ " $NDK /ndk-build" ${BUILD_ARG} -j${THREADS}
92+ elif [[ -n $( command -v cmd && cmd /C set | grep -i ' NDK' ) ]]; then
93+ cmd /C " set CGE_USE_VIDEO_MODULE=1 && %NDK%/ndk-build.cmd" ${BUILD_ARG} -j${THREADS}
94+ else
95+ echo " Can not find NDK!"
96+ fi
You can’t perform that action at this time.
0 commit comments