zoe
zoe copied to clipboard
使用 FetchContent 方式,导入项目使用失败
include(FetchContent)
set(CURL_INCLUDE_DIR "D:/curl/include")
set(CURL_LIBRARY "D:/curl/lib/libcurl.lib")
find_package(CURL REQUIRED)
set(ZOE_BUILD_SHARED_LIBS OFF CACHE BOOL "No Build zoe as shared library" FORCE)
set(ZOE_USE_STATIC_CRT ON CACHE BOOL "Build zoe as static library" FORCE)
FetchContent_Declare(
zoe
GIT_REPOSITORY https://github.com/winsoft666/zoe.git
GIT_TAG master
GIT_SHALLOW TRUE
SOURCE_SUBDIR src
)
FetchContent_MakeAvailable(zoe)
target_link_libraries(${PROJECT_NAME} PRIVATE
zoe
)
然后在项目中,引入:
#include <zoe/zoe.h>
但在编译的时候报错: