CMake Error: 'target_link_libraries' Keyword Signature Conflict - Solution Guide
This error message indicates that within the target 'Luhome', you have used different keyword signatures for 'target_link_libraries'. To resolve this, carefully examine your CMakeLists.txt file for any repeated use of the 'target_link_libraries' keyword. Ensure that all instances use the same keyword signature. If you require different signatures, assign them to separate targets.
Example:
Instead of:
target_link_libraries(Luhome ${CMAKE_BUILD_TYPE} ${LIB_DEPENDENCY})
target_link_libraries(Luhome PRIVATE ${LIB_DEPENDENCY})
Use:
target_link_libraries(Luhome PUBLIC ${LIB_DEPENDENCY})
target_link_libraries(Luhome PRIVATE ${LIB_DEPENDENCY})
This ensures a consistent keyword signature throughout your project.
原文地址: https://www.cveoy.top/t/topic/nj8I 著作权归作者所有。请勿转载和采集!