fix file cmake
This commit is contained in:
parent
88ebdb465c
commit
479ec49eef
|
|
@ -27,11 +27,27 @@ target_include_directories(xmlrpcpp
|
|||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
|
||||
)
|
||||
|
||||
# --- Cài đặt thư viện vào hệ thống khi chạy make install ---
|
||||
install(TARGETS xmlrpcpp
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
EXPORT xmlrpcpp-targets
|
||||
ARCHIVE DESTINATION lib # Thư viện tĩnh .a
|
||||
LIBRARY DESTINATION lib # Thư viện động .so
|
||||
RUNTIME DESTINATION bin # File thực thi (nếu có)
|
||||
INCLUDES DESTINATION include # Cài đặt include
|
||||
)
|
||||
|
||||
install(DIRECTORY include/
|
||||
DESTINATION include/
|
||||
install(
|
||||
DIRECTORY include/
|
||||
DESTINATION include/
|
||||
)
|
||||
|
||||
# --- Xuất export set xmlrpcpp-targets thành file CMake module ---
|
||||
# --- Tạo file lib/cmake/xmlrpcpp/xmlrpcpp-targets.cmake ---
|
||||
# --- File này chứa cấu hình giúp project khác có thể dùng ---
|
||||
# --- Find_package(xmlrpcpp REQUIRED) ---
|
||||
# --- Target_link_libraries(my_app PRIVATE xmlrpcpp::xmlrpcpp) ---
|
||||
install(EXPORT xmlrpcpp-targets
|
||||
FILE xmlrpcpp-targets.cmake
|
||||
NAMESPACE xmlrpcpp::
|
||||
DESTINATION lib/cmake/xmlrpcpp
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user