Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

库与头文件安装目的错误 #12

Closed
xatabhk opened this issue Aug 6, 2020 · 0 comments
Closed

库与头文件安装目的错误 #12

xatabhk opened this issue Aug 6, 2020 · 0 comments

Comments

@xatabhk
Copy link

xatabhk commented Aug 6, 2020

原因是使用了固定目录, 即/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/)

@xatabhk xatabhk closed this as completed Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant