调整库得引用
This commit is contained in:
parent
4766215af9
commit
cd4dbb10f8
@ -14,53 +14,6 @@
|
|||||||
"x86_64"
|
"x86_64"
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
"nativeLib":{
|
|
||||||
"librariesInfo": [
|
|
||||||
{
|
|
||||||
"name": "libocctrender.so",
|
|
||||||
"headerPath": "./src/main/cpp/include/opencascade",
|
|
||||||
"linkLibraries": [
|
|
||||||
// OCCT 核心库(按 CMake 中顺序)
|
|
||||||
"TKernel",
|
|
||||||
"TKBRep",
|
|
||||||
"TKOpenGles",
|
|
||||||
"TKMath",
|
|
||||||
"TKG2d",
|
|
||||||
"TKG3d",
|
|
||||||
"TKGeomBase",
|
|
||||||
"TKGeomAlgo",
|
|
||||||
"TKTopAlgo",
|
|
||||||
"TKMesh",
|
|
||||||
"TKService",
|
|
||||||
"TKV3d",
|
|
||||||
"TKXCAF",
|
|
||||||
"TKCAF",
|
|
||||||
"TKLCAF",
|
|
||||||
"TKCDF",
|
|
||||||
"TKFillet",
|
|
||||||
"TKDESTEP",
|
|
||||||
"TKShHealing",
|
|
||||||
"TKHLR",
|
|
||||||
"TKVCAF",
|
|
||||||
"TKBO",
|
|
||||||
"TKPrim",
|
|
||||||
"TKBool",
|
|
||||||
"TKDE",
|
|
||||||
"TKXSBase",
|
|
||||||
// 第三方依赖
|
|
||||||
"freetype",
|
|
||||||
"fontconfig",
|
|
||||||
"brotlicommon",
|
|
||||||
"brotlidec",
|
|
||||||
"brotlienc",
|
|
||||||
"expat",
|
|
||||||
"png16",
|
|
||||||
"bz2",
|
|
||||||
"z",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"arkOptions": {
|
"arkOptions": {
|
||||||
"runtimeOnly" : {
|
"runtimeOnly" : {
|
||||||
"packages": [
|
"packages": [
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -11,17 +11,62 @@ include_directories(${NATIVERENDER_ROOT_PATH}
|
|||||||
${NATIVERENDER_ROOT_PATH}/include/opencascade
|
${NATIVERENDER_ROOT_PATH}/include/opencascade
|
||||||
)
|
)
|
||||||
|
|
||||||
# OCCT 库目录(仅用于查找文件,不直接用于链接)
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
set(OCCT_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH})
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
link_directories(${OCCT_LIB_DIR})
|
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
|
||||||
|
|
||||||
# 定义 OCCT 核心库列表
|
# OCCT 库目录
|
||||||
set(OCCT_LIBS
|
set(OCCT_VERSION "7.9")
|
||||||
|
set(OCCT_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs/${OHOS_ARCH})
|
||||||
|
#OCCT LIBS
|
||||||
|
set(OCCT_CORE_LIBS
|
||||||
TKernel TKBRep TKOpenGles TKMath TKG2d TKG3d TKGeomBase TKGeomAlgo
|
TKernel TKBRep TKOpenGles TKMath TKG2d TKG3d TKGeomBase TKGeomAlgo
|
||||||
TKTopAlgo TKMesh TKService TKV3d TKXCAF TKCAF TKLCAF TKCDF TKFillet
|
TKTopAlgo TKMesh TKService TKV3d TKXCAF TKCAF TKLCAF TKCDF TKFillet
|
||||||
TKDESTEP TKShHealing TKHLR TKVCAF TKBO TKPrim TKBool TKDE TKXSBase
|
TKDESTEP TKShHealing TKHLR TKVCAF TKBO TKPrim TKBool TKDE TKXSBase
|
||||||
|
)
|
||||||
|
foreach(LIB_NAME ${OCCT_CORE_LIBS})
|
||||||
|
add_library(occt_${LIB_NAME} SHARED IMPORTED)
|
||||||
|
set_target_properties(occt_${LIB_NAME} PROPERTIES
|
||||||
|
IMPORTED_LOCATION ${OCCT_LIB_DIR}/lib${LIB_NAME}.so.${OCCT_VERSION}
|
||||||
|
IMPORTED_SONAME lib${LIB_NAME}.so.${OCCT_VERSION}
|
||||||
|
)
|
||||||
|
list(APPEND OCCT_IMPORTED_LIBS occt_${LIB_NAME})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
#THIRD_PARTY_LIBS
|
||||||
|
set(THIRD_PARTY_LIBS
|
||||||
freetype fontconfig expat z bz2 png16 brotlicommon brotlidec brotlienc
|
freetype fontconfig expat z bz2 png16 brotlicommon brotlidec brotlienc
|
||||||
)
|
)
|
||||||
|
foreach(LIB_NAME ${THIRD_PARTY_LIBS})
|
||||||
|
if(LIB_NAME STREQUAL "z")
|
||||||
|
set(LIB_FILE "libz.so.1")
|
||||||
|
elseif(LIB_NAME STREQUAL "bz2")
|
||||||
|
set(LIB_FILE "libbz2.so.1.0")
|
||||||
|
elseif(LIB_NAME STREQUAL "png16")
|
||||||
|
set(LIB_FILE "libpng16.so.16")
|
||||||
|
elseif(LIB_NAME STREQUAL "brotlicommon")
|
||||||
|
set(LIB_FILE "libbrotlicommon.so.1")
|
||||||
|
elseif(LIB_NAME STREQUAL "brotlidec")
|
||||||
|
set(LIB_FILE "libbrotlidec.so.1")
|
||||||
|
elseif(LIB_NAME STREQUAL "brotlienc")
|
||||||
|
set(LIB_FILE "libbrotlienc.so.1")
|
||||||
|
elseif(LIB_NAME STREQUAL "fontconfig")
|
||||||
|
set(LIB_FILE "libfontconfig.so.1")
|
||||||
|
elseif(LIB_NAME STREQUAL "freetype")
|
||||||
|
set(LIB_FILE "libfreetype.so.6")
|
||||||
|
elseif(LIB_NAME STREQUAL "expat")
|
||||||
|
set(LIB_FILE "libexpat.so.1")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(tp_${LIB_NAME} SHARED IMPORTED)
|
||||||
|
set_target_properties(tp_${LIB_NAME} PROPERTIES
|
||||||
|
IMPORTED_LOCATION ${OCCT_LIB_DIR}/${LIB_FILE}
|
||||||
|
IMPORTED_SONAME ${LIB_FILE}
|
||||||
|
)
|
||||||
|
list(APPEND OCCT_IMPORTED_LIBS tp_${LIB_NAME})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# 添加源文件
|
# 添加源文件
|
||||||
add_library(occtrender SHARED
|
add_library(occtrender SHARED
|
||||||
napi_init.cpp
|
napi_init.cpp
|
||||||
@ -42,6 +87,10 @@ find_library(hilog-lib hilog_ndk.z)
|
|||||||
find_library(libace-lib ace_ndk.z)
|
find_library(libace-lib ace_ndk.z)
|
||||||
find_library(libuv-lib uv)
|
find_library(libuv-lib uv)
|
||||||
|
|
||||||
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||||
|
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||||
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
# 链接系统库
|
# 链接系统库
|
||||||
target_link_libraries(occtrender PUBLIC
|
target_link_libraries(occtrender PUBLIC
|
||||||
# EGL Hilog 库
|
# EGL Hilog 库
|
||||||
@ -53,6 +102,6 @@ target_link_libraries(occtrender PUBLIC
|
|||||||
libnative_window.so
|
libnative_window.so
|
||||||
libace_napi.z.so
|
libace_napi.z.so
|
||||||
#OCCT核心库
|
#OCCT核心库
|
||||||
${OCCT_LIBS}
|
${OCCT_IMPORTED_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user