vcpe/srcs/libs/CMakeLists.txt

36 lines
1.1 KiB
CMake

SET(LIB_PROJECT_TARGET common)
PROJECT(${LIB_PROJECT_TARGET})
include(ExternalProject)
INCLUDE_DIRECTORIES(include
./ ./include ../lwip/src/include ../lwip/src/arch_linux/include ../include
../httpserver/include ../httpserver/src/haywire ../httpserver/src/haywire/configuration
${COMMON_INCLUDE})
FILE(GLOB C_HEADS include/*.h include/uthash/*.h include/s2j/*.h)
AUX_SOURCE_DIRECTORY(json C_SRC)
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)
SET(CMAKE_C_STANDARD 99)
ADD_DEFINITIONS(-DBUILD_VERSION="${GIT_VERSION}")
LINK_LIBRARIES(${COMMON_LIBS})
ADD_LIBRARY(${LIB_PROJECT_TARGET} ${C_SRC} ${C_HEADS})
TARGET_LINK_LIBRARIES(${LIB_PROJECT_TARGET} haywire)
TARGET_LINK_LIBRARIES(${LIB_PROJECT_TARGET} opendhcpd)