OCT ZNJK-1000 更新CMake编译脚本选项
This commit is contained in:
parent
99d7f1ff97
commit
0adceb1000
|
@ -32,10 +32,13 @@ endif ()
|
||||||
|
|
||||||
if (USED_LWIP)
|
if (USED_LWIP)
|
||||||
MESSAGE("Select Option USED_LWIP")
|
MESSAGE("Select Option USED_LWIP")
|
||||||
ADD_SUBDIRECTORY(srcs/lwip)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (USED_OPENDHCPD)
|
if (USED_OPENDHCPD)
|
||||||
MESSAGE("Select Option USED_OPENDHCPD")
|
MESSAGE("Select Option USED_OPENDHCPD")
|
||||||
ADD_SUBDIRECTORY(srcs/open_dhcp)
|
ADD_SUBDIRECTORY(srcs/open_dhcp)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (USED_LWIP OR VCPE_AGENT)
|
||||||
|
ADD_SUBDIRECTORY(srcs/lwip)
|
||||||
|
endif ()
|
||||||
|
|
|
@ -11,12 +11,15 @@ include(ExternalProject)
|
||||||
# 判断依赖库是否存在
|
# 判断依赖库是否存在
|
||||||
FIND_PACKAGE(PkgConfig)
|
FIND_PACKAGE(PkgConfig)
|
||||||
|
|
||||||
PKG_SEARCH_MODULE(LIBCURL REQUIRED libcurl)
|
if (USED_LWIP OR VCPE_AGENT)
|
||||||
PKG_SEARCH_MODULE(LIBSSL REQUIRED libssl)
|
PKG_SEARCH_MODULE(LIBCURL REQUIRED libcurl)
|
||||||
PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto)
|
PKG_SEARCH_MODULE(LIBSSL REQUIRED libssl)
|
||||||
|
PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto)
|
||||||
|
LIST(APPEND COMMON_LIBS "${LIBCURL_LDFLAGS} ${LIBSSL_LDFLAGS} ${LIBCRYPTO_LDFLAGS}")
|
||||||
|
LIST(APPEND COMMON_LIBS "-ldl -lpthread -lzlog -lm -luv -lzmq -luuid -lconfig")
|
||||||
|
endif ()
|
||||||
|
|
||||||
SET(COMMON_LIBS ${LIBCURL_LDFLAGS} ${LIBSSL_LDFLAGS} ${LIBCRYPTO_LDFLAGS})
|
LIST(APPEND COMMON_LIBS "-lpthread")
|
||||||
SET(COMMON_LIBS ${COMMON_LIBS} "-ldl -lpthread -lzlog -lm -luv -lzmq -luuid -lconfig")
|
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(include ./ ./include ./libs/include ./lwip/src/include ./lwip/src/arch_linux/include ${COMMON_INCLUDE})
|
INCLUDE_DIRECTORIES(include ./ ./include ./libs/include ./lwip/src/include ./lwip/src/arch_linux/include ${COMMON_INCLUDE})
|
||||||
|
|
||||||
|
|
|
@ -7,19 +7,22 @@ include(ExternalProject)
|
||||||
INCLUDE_DIRECTORIES(include ./ ./include ../lwip/src/include ../lwip/src/arch_linux/include ../include ${COMMON_INCLUDE})
|
INCLUDE_DIRECTORIES(include ./ ./include ../lwip/src/include ../lwip/src/arch_linux/include ../include ${COMMON_INCLUDE})
|
||||||
FILE(GLOB C_HEADS include/*.h include/uthash/*.h include/s2j/*.h)
|
FILE(GLOB C_HEADS include/*.h include/uthash/*.h include/s2j/*.h)
|
||||||
|
|
||||||
AUX_SOURCE_DIRECTORY(args C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(init C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(misc C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(database C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(banner C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(configure C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(network C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(task C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(mq C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(cmdline C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(crypto C_SRC)
|
|
||||||
AUX_SOURCE_DIRECTORY(json C_SRC)
|
AUX_SOURCE_DIRECTORY(json C_SRC)
|
||||||
AUX_SOURCE_DIRECTORY(hardware C_SRC)
|
|
||||||
|
if (USED_LWIP OR VCPE_AGENT)
|
||||||
|
AUX_SOURCE_DIRECTORY(args C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(init C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(misc C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(database C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(banner C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(configure C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(network C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(task C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(mq C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(cmdline C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(crypto C_SRC)
|
||||||
|
AUX_SOURCE_DIRECTORY(hardware C_SRC)
|
||||||
|
endif ()
|
||||||
|
|
||||||
SET(CMAKE_C_STANDARD 99)
|
SET(CMAKE_C_STANDARD 99)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ INCLUDE_DIRECTORIES(../libs/include ./)
|
||||||
|
|
||||||
FILE(GLOB DHCPD_HEADS ./*.h)
|
FILE(GLOB DHCPD_HEADS ./*.h)
|
||||||
|
|
||||||
add_definitions(-Wno-format-overflow)
|
ADD_DEFINITIONS(-Wno-format-overflow)
|
||||||
#ADD_EXECUTABLE(${PROJECT_TARGET} opendhcpd.cpp ${DHCPD_HEADS})
|
#ADD_EXECUTABLE(${PROJECT_TARGET} opendhcpd.cpp ${DHCPD_HEADS})
|
||||||
ADD_LIBRARY(${DHCPD_PROJECT_TARGET} opendhcpd.cpp ${DHCPD_HEADS})
|
ADD_LIBRARY(${DHCPD_PROJECT_TARGET} opendhcpd.cpp ${DHCPD_HEADS})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue