38 lines
1.2 KiB
CMake
38 lines
1.2 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)
|
|
FILE(GLOB C_HEADS include/*.h include/uthash/*.h include/s2j/*.h vector/*.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)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(misc/zvector.c PROPERTIES COMPILE_FLAGS "-Wall -Wextra -flto")
|
|
|
|
ADD_DEFINITIONS(-DBUILD_VERSION="${GIT_VERSION}" ${COMMON_DEFINE})
|
|
|
|
|
|
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) |