vcpe/CMakeLists.txt

42 lines
1.0 KiB
CMake
Raw Normal View History

2022-05-10 02:59:51 +00:00
CMAKE_MINIMUM_REQUIRED(VERSION 3.14 FATAL_ERROR)
PROJECT(vCPE_project)
OPTION(VCPE_AGENT "Enable vCPE agent test application" OFF)
OPTION(USED_LWIP "PPPoE for vCPE" OFF)
OPTION(USED_OPENDHCPD "DHCP server for vCPE" OFF)
SET(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig")
2022-05-10 02:59:51 +00:00
SET(URI_HOME "${CMAKE_SOURCE_DIR}/libs")
EXECUTE_PROCESS(COMMAND git describe --tags --always --dirty=-dev
OUTPUT_VARIABLE GIT_TAG)
if ("${GIT_TAG}" STREQUAL "")
STRING(TIMESTAMP COMPILE_TIME %Y-%m-%d_%H:%M:%S)
SET(GIT_VERSION ${COMPILE_TIME})
2022-05-10 02:59:51 +00:00
else ()
STRING(REGEX REPLACE "\n$" "" GIT_TAG ${GIT_TAG})
SET(GIT_VERSION ${GIT_TAG})
2022-05-10 02:59:51 +00:00
endif ()
2022-05-10 02:59:51 +00:00
MESSAGE("Version: " ${GIT_VERSION})
2022-05-10 02:59:51 +00:00
2022-05-10 06:43:27 +00:00
ADD_SUBDIRECTORY(srcs)
ADD_SUBDIRECTORY(srcs/libs)
if (VCPE_AGENT)
MESSAGE("Select Option VCPE_AGENT")
endif ()
if (USED_LWIP)
MESSAGE("Select Option USED_LWIP")
ADD_SUBDIRECTORY(srcs/lwip)
endif ()
if (USED_OPENDHCPD)
MESSAGE("Select Option USED_OPENDHCPD")
ADD_SUBDIRECTORY(srcs/open_dhcp)
endif ()