复用filament日志,增加Log头文件暴露
@filament-1.5.2/libs/utils/CMakeLists.txt
set(DIST_HDRS 处增加:
${PUBLIC_HDR_DIR}/${TARGET}/Log.h
${PUBLIC_HDR_DIR}/${TARGET}/ostream.h
${PUBLIC_HDR_DIR}/${TARGET}/ThreadLocal.h
libassimp.a 暴露(直接加载模型的第三方库)
@filament-1.5.2/CMakeLists.txt
add_subdirectory(${EXTERNAL}/libassimp/tnt)
从if (NOT ANDROID AND NOT WEBGL AND NOT IOS)区域挪到# Common to all platforms区域
增加so和头文件install指令@filament-1.5.2/third_party/libassimp/tnt/CMakeLists.txt
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
install(DIRECTORY ${PUBLIC_HDR_DIR}/assimp DESTINATION include)
增加libassimp依赖库libz
@filament-1.5.2/CMakeLists.txt
add_subdirectory(${EXTERNAL}/libassimp/tnt)
从if (NOT ANDROID AND NOT WEBGL AND NOT IOS)区域挪到# Common to all platforms区域
增加so和头文件install指令@filament-1.5.2/third_party/libz/tnt/CMakeLists.txt
install(TARGETS ${TARGET} ARCHIVE DESTINATION lib/${DIST_DIR})
install(FILES ${PUBLIC_HDRS} DESTINATION include)
增加stb头文件暴露(图片读取)
set(DU3D_PUBLIC_HDRS
${OUR_DIR}/stb.h
${OUR_DIR}/stb_c_lexer.h
${OUR_DIR}/stb_connected_components.h
${OUR_DIR}/stb_divide.h
${OUR_DIR}/stb_dxt.h
${OUR_DIR}/stb_easy_font.h
${OUR_DIR}/stb_herringbone_wang_tile.h
${OUR_DIR}/stb_image.h
${OUR_DIR}/stb_image_resize.h
${OUR_DIR}/stb_image_write.h
${OUR_DIR}/stb_leakcheck.h
${OUR_DIR}/stb_perlin.h
${OUR_DIR}/stb_rect_pack.h
${OUR_DIR}/stb_sprintf.h
${OUR_DIR}/stb_textedit.h
${OUR_DIR}/stb_tilemap_editor.h
${OUR_DIR}/stb_truetype.h
${OUR_DIR}/stb_vorbis.c
${OUR_DIR}/stb_voxel_render.h
${OUR_DIR}/stretchy_buffer.h
)
install(FILES ${DU3D_PUBLIC_HDRS} DESTINATION include)
引入第三方开源库jsoncpp
jsoncpp源码解压到filament-1.5.2/third_party/目录
参考third_party其它开源库,写filament统一风格的简易CMakeLists.txt文件,使用核心功能,暴露头文件和lib库
登记到filament统一编译入口 @filament-1.5.2/CMakeLists.txt
add_subdirectory(${EXTERNAL}/jsoncpp-master/tnt)