写在前面。感觉越来越不爽。自己不会的太多了。
1.编译静态链接库:就以DSO的cmakelist为样板各种面目全非吧。
# Sources files
set(dso_SOURCE_FILES
${PROJECT_SOURCE_DIR}/FullSystem/FullSystem.cpp
${PROJECT_SOURCE_DIR}/FullSystem/FullSystemOptimize.cpp
......
)
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/thirdparty/Sophus
...
)
add_library(dso STATIC ${dso_SOURCE_FILES} ${dso_opencv_SOURCE_FILES} ${dso_pangolin_SOURCE_FILES})
2.编好的静态库与另一个已编好的链接到一起
target_link_libraries(libdsomaster dso boost_system cxsparse ${} ${LIBZIP_LIBRARY} ${} ${})
。。。待续吧