|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
请问用cmake编译出现下面的情况怎么回事呢,有大佬知道的么?
CMake Error at platform/linux/CMakeLists.txt:3 (get_filename_component):
get_filename_component unknown component DIRECTORY
CMake Error at platform/linux/CMakeLists.txt:5 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
CMake Warning at platform/linux/CMakeLists.txt:9 (if):
given arguments:
"STREQUAL" "mqtt"
Unknown arguments specified
CMake Warning at platform/linux/CMakeLists.txt:9 (if):
given arguments:
"STREQUAL" "platform"
Unknown arguments specified
CMake Warning at platform/linux/CMakeLists.txt:9 (if):
given arguments:
"STREQUAL" "network"
Unknown arguments specified
CMake Warning at platform/linux/CMakeLists.txt:9 (if):
given arguments:
"STREQUAL" "common"
Unknown arguments specified
CMake Warning at platform/linux/CMakeLists.txt:9 (if):
given arguments:
"STREQUAL" "salof"
Unknown arguments specified
CMake Warning at platform/linux/CMakeLists.txt:9 (if):
given arguments:
"STREQUAL" "mbedtls"
Unknown arguments specified
CMake Warning at platform/linux/CMakeLists.txt:9 (if):
given arguments:
"STREQUAL" "mqttclient"
Unknown arguments specified
CMake Error at common/log/arch/linux/CMakeLists.txt:3 (get_filename_component):
get_filename_component unknown component DIRECTORY
CMake Error at common/log/arch/linux/CMakeLists.txt:5 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
-- Configuring incomplete, errors occurred!
CMake Error: The source directory "" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
make: *** [cmake_check_build_system] 错误 1
下面是我的cmakelist.txt文件
aux_source_directory(. DIR_SRCS)
get_filename_component(PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
string(REGEX REPLACE ".*/(.*)" "\\1" LIB_NAME ${PARENT_DIR})
if (DIR_SRCS)
foreach(libname ${LIBNAMES})
if (${LIB_NAME} STREQUAL ${libname})
add_library(${libname} ${CMAKE_LIB_TYPE} ${DIR_SRCS})
endif()
endforeach()
else()
message(WARNING "not find is src file!")
endif()
|
|