fix file cmake

This commit is contained in:
duongtd 2025-12-02 10:41:01 +07:00
parent 88ebdb465c
commit 479ec49eef

View File

@ -27,11 +27,27 @@ target_include_directories(xmlrpcpp
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
)
# --- Cài đt thư vin vào h thng khi chy make install ---
install(TARGETS xmlrpcpp
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
EXPORT xmlrpcpp-targets
ARCHIVE DESTINATION lib # Thư vin tĩnh .a
LIBRARY DESTINATION lib # Thư vin đng .so
RUNTIME DESTINATION bin # File thc thi (nếu )
INCLUDES DESTINATION include # Cài đt include
)
install(DIRECTORY include/
DESTINATION include/
install(
DIRECTORY include/
DESTINATION include/
)
# --- Xut export set xmlrpcpp-targets thành file CMake module ---
# --- To file lib/cmake/xmlrpcpp/xmlrpcpp-targets.cmake ---
# --- File này cha cu 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
)