Closed xatabhk closed 4 years ago
原因是使用了固定目录, 即/usr/include/与/usr/lib: install(TARGETS uavs3e LIBRARY DESTINATION /usr/lib ARCHIVE DESTINATION /usr/lib) install(FILES ../inc/uavs3e.h DESTINATION /usr/include/uavs3e/) install(FILES ../inc/com_api.h DESTINATION /usr/include/uavs3e/)
而应为: install(TARGETS uavs3e LIBRARY DESTINATION ${CMAKE_INSTALL_LIB_DIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIB_DIR}) install(FILES ../inc/uavs3e.h DESTINATION ${INSTALL_INCLUDE_DIR}/uavs3e/) install(FILES ../inc/com_api.h DESTINATION ${INSTALL_INCLUDE_DIR}/uavs3e/)
原因是使用了固定目录, 即/usr/include/与/usr/lib: install(TARGETS uavs3e LIBRARY DESTINATION /usr/lib ARCHIVE DESTINATION /usr/lib) install(FILES ../inc/uavs3e.h DESTINATION /usr/include/uavs3e/) install(FILES ../inc/com_api.h DESTINATION /usr/include/uavs3e/)
而应为: install(TARGETS uavs3e LIBRARY DESTINATION ${CMAKE_INSTALL_LIB_DIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIB_DIR}) install(FILES ../inc/uavs3e.h DESTINATION ${INSTALL_INCLUDE_DIR}/uavs3e/) install(FILES ../inc/com_api.h DESTINATION ${INSTALL_INCLUDE_DIR}/uavs3e/)