Skip to content

Commit f2d546b

Browse files
committed
finish iOS
1 parent d555b70 commit f2d546b

File tree

3 files changed

+47
-31
lines changed

3 files changed

+47
-31
lines changed

build/build.sh

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -420,35 +420,39 @@ do
420420

421421

422422
echo "Copying needed header files..."
423-
#determine the real folder name
424-
parse_original_library_folder_name=${lib}_header_files_folder
425-
library_include_folder_name=${!parse_original_library_folder_name}
426-
if [ -z $library_include_folder_name ];then
427-
library_include_folder_name=$archive_name
428-
fi
429-
430-
431-
#copy header files for ios & mac
432-
if [ $cfg_platform_name = "ios" ] || [ $cfg_platform_name = "mac" ];then
433-
if [ ! -d $top_dir/build/$cfg_platform_name/include/$library_include_folder_name ];then
434-
mkdir -p $top_dir/build/$cfg_platform_name/include/$library_include_folder_name
423+
parse_ignore_header_files=${lib}_ignore_header_files
424+
original_ignore_header_files=${!parse_ignore_header_files}
425+
if [ "${original_ignore_header_files}" != "yes" ];then
426+
#determine the real folder name
427+
parse_original_library_folder_name=${lib}_header_files_folder
428+
library_include_folder_name=${!parse_original_library_folder_name}
429+
if [ -z $library_include_folder_name ];then
430+
library_include_folder_name=$archive_name
431+
fi
432+
433+
434+
#copy header files for ios & mac
435+
if [ $cfg_platform_name = "ios" ] || [ $cfg_platform_name = "mac" ];then
436+
if [ ! -d $top_dir/build/$cfg_platform_name/include/$library_include_folder_name ];then
437+
mkdir -p $top_dir/build/$cfg_platform_name/include/$library_include_folder_name
438+
fi
439+
fi
440+
441+
mkdir -p $cfg_platform_name/$original_arch_name/include/$library_include_folder_name
442+
copy_include_file_path=${lib}_header_files
443+
src_directory=$top_dir/contrib/$install_library_path/$arch/include/${!copy_include_file_path}
444+
echo $src_directory
445+
destination_header_path=$cfg_platform_name/$original_arch_name/include/$library_include_folder_name
446+
447+
if [ $cfg_platform_name = "ios" ] || [ $cfg_platform_name = "mac" ];then
448+
destination_header_path=$cfg_platform_name/include/$library_include_folder_name
449+
fi
450+
451+
if [ -d "$src_directory" ];then
452+
cp -r $src_directory/* $destination_header_path
453+
else
454+
cp $src_directory $destination_header_path
435455
fi
436-
fi
437-
438-
mkdir -p $cfg_platform_name/$original_arch_name/include/$library_include_folder_name
439-
copy_include_file_path=${lib}_header_files
440-
src_directory=$top_dir/contrib/$install_library_path/$arch/include/${!copy_include_file_path}
441-
echo $src_directory
442-
destination_header_path=$cfg_platform_name/$original_arch_name/include/$library_include_folder_name
443-
444-
if [ $cfg_platform_name = "ios" ] || [ $cfg_platform_name = "mac" ];then
445-
destination_header_path=$cfg_platform_name/include/$library_include_folder_name
446-
fi
447-
448-
if [ -d "$src_directory" ];then
449-
cp -r $src_directory/* $destination_header_path
450-
else
451-
cp $src_directory $destination_header_path
452456
fi
453457

454458

@@ -490,4 +494,13 @@ if [ $cfg_platform_name = "ios" ] || [ $cfg_platform_name = "mac" ];then
490494
done
491495
fi
492496

497+
#check ios & mac library architecture
498+
if [ $cfg_platform_name = "ios" ] || [ $cfg_platform_name = "mac" ];then
499+
for file in `ls ${cfg_platform_name}/libs`
500+
do
501+
lipo -info ${cfg_platform_name}/libs/$file
502+
done
503+
fi
504+
505+
493506
echo "done!"

build/ios.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ cfg_armv7s_host_machine="arm-apple-darwin"
1414
cfg_arm64_host_machine="arm-apple-darwin"
1515

1616
cfg_all_supported_arches=("armv7" "armv7s" "i386" "arm64" "x86_64")
17-
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d" "rapidjson")
18-
cfg_default_arches_all=("armv7" "armv7s" "i386" "arm64" "x86_64")
19-
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "flatbuffers" "minizip" "tinyxml2" "cjson" "luasocket" "box2d" "rapidjson")
17+
cfg_all_supported_libraries=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "minizip" "tinyxml2" "cjson" "luasocket" "box2d" "rapidjson")
18+
cfg_default_arches_all=("armv7" "i386" "arm64" "x86_64")
19+
cfg_default_libraries_all=("png" "zlib" "lua" "luajit" "websockets" "curl" "freetype" "jpeg" "tiff" "webp" "chipmunk" "openssl" "edtaa3func" "xxhash" "xxtea" "convertutf" "minizip" "tinyxml2" "cjson" "luasocket" "box2d" "rapidjson")
2020

2121

2222
cfg_build_fat_library=yes

build/main.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ glew_header_files=GL
3333
#don't copy archive files for header only libraries, eg. rapidjson
3434
rapidjson_ignore_archive=yes
3535

36+
#don't copy header files for some specific libraries
37+
lua_ignore_header_files=yes
38+
3639
#header files Folder
3740
box2d_header_files_folder=Box2D
3841
zlib_header_files_folder=zlib

0 commit comments

Comments
 (0)