SET(LIBHELLO_SRC hello.c)
ADD_LIBRARY(hello_static STATIC ${LIBHELLO_SRC})
SET_TARGET_PROPERTIES(hello_static PROPERTIES OUTPUT_NAME "hello")
GET_TARGET_PROPERTY(OUTPUT_VALUE hello_static OUTPUT_NAME)
SET_TARGET_PROPERTIES(hello_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
SET_TARGET_PROPERTIES(${OUTPUT_VALUE} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
MESSAGE(STATUS “This is the hello_static OUTPUT_NAME: ”${OUTPUT_VALUE})
当我跑步" cmake .."命令,在lib / CMakeLists.txt上给出错误" CMake Error:10(SET_TARGET_PROPERTIES): SET_TARGET_PROPERTIES找不到要添加属性的目标:hello " 我该怎么办,非常感谢!