1. 程式人生 > 其它 >ARM_Linux環境下FreeType的移植與安裝

ARM_Linux環境下FreeType的移植與安裝

因為ARM開發板需要螢幕顯示中文,因此移植了freetype,並記錄下移植的過程

一、下載地址

https://savannah.nongnu.org/download/freetype/
以上地址有freetype各個版本的原始碼下載

二、 移植平臺與環境

1.	ubuntu20.04LTS
2.	arm-linux-gnueabihf-gcc
3.	gcc version 4.9.2
4.	freetype-2.10.0

三、 選擇自己需要的freetype版本進行下載

wget https://savannah.nongnu.org/download/freetype/freetype-2.10.0.tar.bz2

四、 解壓縮

tar xvf freetype-2.10.0.tar.bz2

五、 生成Makefile檔案

cd freetype-2.10.0/
./configure --prefix=/home/wei/freetype --host=arm-linux CC=/opt/a7_toolchain/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-gcc --enable-shared --enable-static --with-zlib=no --with-bzip2=no --with-png=no --with-harfbuzz=no

六、 編譯並且安裝生成freetype的標頭檔案以及庫檔案

make && make install

七、標頭檔案以及庫檔案路徑

標頭檔案路徑:	/home/wei/freetype/include/freetype2/
庫檔案路徑:	/home/wei/freetype/lib

到此,freetype移植完畢,以下介紹一下freetype移植思路

1.	本次移植不使用zlib、bzip2、png、harfbuzz等 		
2.	本次移植同時生成了靜態庫與動態庫,可根據需要選擇使用