DE编译:交叉编译,而不是docker中编译时。
修改CMakePresets.json
对于的preset名字的属性进行关闭,例如:
{
"name": "build-i3-by-sdk",
"binaryDir": "${sourceDir}/build",
"description": "[deprecated] Setup for the ci on i3",
"inherits": "default-make",
"cacheVariables": {
"VARIANT": "CIVIC174M",
"ENABLE_ENHANCED_SIRI": "ON",
"BUILD_TESTING": "OFF",
"ENABLE_CODE_ANALYSIS": "OFF",
"ENABLE_CODE_FORMAT": "OFF",
"ENABLE_DOCS": "OFF",
"ENABLE_PYTHON_TESTS": "OFF",
"ENABLE_UNIT_TESTS": "OFF"
}
},
cd build/
source /opt/mbient/e220/environment-setup-aarch64-mbient-linux
#cmake --preset=ci-i3 ..
#make -j16
#sudo make install/strip
#安装de到 /usr/bin/mbient/
cmake --preset=build-i3-by-sdk ..
ninja
DDH编译:交叉编译,而不是docker中编译时。
修改CMakePresets.json
对于的preset名字的属性进行关闭,例如:
{
"name": "build-i3-by-sdk",
"description": "[deprecated] Setup for the ci on i3",
"inherits": "ci",
"cacheVariables": {
"VARIANT": "CIVIC174M",
"BUILD_TESTING": "OFF",
"ENABLE_CODE_ANALYSIS": "OFF",
"ENABLE_CODE_FORMAT": "OFF",
"ENABLE_DOCS": "OFF",
"ENABLE_PYTHON_TESTS": "OFF",
"ENABLE_UNIT_TESTS": "OFF"
}
},
根据他的inherits继承,层层查找,找到 “generator”: “Ninja”,
没有 "generator"时,默认是make方式编译,如果是ninja,就用ninja编译。
另外,由于$env{BUILD_DIR}环境变量是空的,没有定义,所以需要写死为build。
{
"name": "ci",
"binaryDir": "${sourceDir}/build",
交叉编译:
source /opt/mbient/e69.0/environment-setup-aarch64-mbient-linux
cd build/
cmake --preset=build-i3-by-sdk ..
ninja
执行cmake
y@HP:~/test/dialog-manifests/dialog-domain-handlers/build$ cmake --preset=build-i3-by-sdk ..
注意事项
在ddh每次重新cmake之后需要修改ninja配置文件:
/home/sy/test/dialog-manifests/dialog-domain-handlers/build/uild.ninja
文件在39行左右添加
-I/opt/mbient/e66.0-3.0/sysroots/cortexa78c-mbient-linux/usr/include/thriftme
如下所示:
DEFINES = -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DCIVIC174M -DFMT_LOCALE -DFMT_SHARED -DJSON_DIAGNOSTICS=0 -DJSON_USE_IMPLICIT_CONVERSIONS=1
DEP_FILE = src/EmbeddedCommon/CommonPhone/mocks/CMakeFiles/CommonPhoneMocks.dir/CommonPhoneSharedMock.cpp.o.d
FLAGS = -O2 -pipe -g -feliminate-unused-debug-types -O3 -DNDEBUG "-DBETTER_ENUMS_MACRO_FILE=<enum_macros.h>" -std=c++17
INCLUDES = -I/opt/mbient/e66.0-3.0/sysroots/cortexa78c-mbient-linux/usr/include/thriftme -I/home/sy/test/dialog-manifests/dialog-domain-handlers/src/EmbeddedCommon/CommonPhone/mocks/.
然后执行ninjia, 等待编译完成,编译完成后,放到台架上查看是否可以运行。