OCT 1. 修正使用内置开源库时找不到头文件问题
This commit is contained in:
parent
d2e49f254e
commit
c13bb5d3cd
|
@ -66,6 +66,13 @@ CONFIGURE_FILE(prj_config.h.in prj_config.h)
|
|||
|
||||
MESSAGE("Git Tag: " ${VERSION_GIT_TAG})
|
||||
|
||||
# 判断依赖库是否存在
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
|
||||
SET(COMMON_LIBS "")
|
||||
|
||||
INCLUDE(./depend/third_libs.cmake)
|
||||
|
||||
IF (USED_USER_VNI)
|
||||
LIST(APPEND COMMON_DEFINE "-DUSER_VNI")
|
||||
MESSAGE("Select Option USED_USER_VNI")
|
||||
|
|
|
@ -42,6 +42,7 @@ IF (NOT LIBUV_FOUND)
|
|||
FETCHCONTENT_POPULATE(libuv)
|
||||
ADD_SUBDIRECTORY(${libuv_SOURCE_DIR} ${libuv_BINARY_DIR})
|
||||
ENDIF ()
|
||||
INCLUDE_DIRECTORIES(${libuv_SOURCE_DIR}/include)
|
||||
LIST(APPEND COMMON_LIBS "uv_a")
|
||||
ELSE ()
|
||||
MESSAGE(STATUS "libuv found ${LIBUV_VERSION} at ${LIBUV_LIBRARY_DIRS}")
|
||||
|
@ -55,6 +56,7 @@ IF (NOT LIBCONFIG_FOUND)
|
|||
FETCHCONTENT_POPULATE(libconfig)
|
||||
ADD_SUBDIRECTORY(${libconfig_SOURCE_DIR} ${libconfig_BINARY_DIR})
|
||||
ENDIF ()
|
||||
INCLUDE_DIRECTORIES(${libconfig_SOURCE_DIR}/lib)
|
||||
LIST(APPEND COMMON_LIBS "config")
|
||||
ELSE ()
|
||||
MESSAGE(STATUS "libconfig found ${LIBCONFIG_VERSION} at ${LIBCONFIG_LIBRARY_DIRS}")
|
||||
|
@ -68,6 +70,7 @@ IF (LIBZLOG STREQUAL "LIBZLOG-NOTFOUND")
|
|||
FETCHCONTENT_POPULATE(zlog)
|
||||
ADD_SUBDIRECTORY(${zlog_SOURCE_DIR} ${zlog_BINARY_DIR})
|
||||
ENDIF ()
|
||||
INCLUDE_DIRECTORIES(${zlog_SOURCE_DIR}/src)
|
||||
LIST(APPEND COMMON_LIBS "zlog")
|
||||
ELSE ()
|
||||
MESSAGE(STATUS "zlog found of ${LIBZLOG}")
|
||||
|
|
|
@ -6,8 +6,7 @@ ENDIF ()
|
|||
|
||||
PROJECT(${PROJECT_TARGET})
|
||||
|
||||
# 判断依赖库是否存在
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
|
||||
|
||||
PKG_SEARCH_MODULE(LIBCURL QUIET libcurl)
|
||||
PKG_SEARCH_MODULE(LIBSSL QUIET libssl)
|
||||
|
@ -18,10 +17,6 @@ IF ((NOT LIBZMQ_FOUND) OR (NOT LIBCRYPTO_FOUND) OR (NOT LIBSSL_FOUND) OR (NOT LI
|
|||
LINUX_INSTALL_SYSTEM_PACKAGE()
|
||||
ENDIF ()
|
||||
|
||||
SET(COMMON_LIBS "")
|
||||
|
||||
INCLUDE(../depend/third_libs.cmake)
|
||||
|
||||
LIST(APPEND COMMON_LIBS "${LIBCURL_LDFLAGS} ${LIBSSL_LDFLAGS} ${LIBCRYPTO_LDFLAGS}")
|
||||
LIST(APPEND COMMON_LIBS "${LIBZMQ_LDFLAGS}")
|
||||
LIST(APPEND COMMON_LIBS "-lm -lpthread")
|
||||
|
|
Loading…
Reference in New Issue