CMAKE_MINIMUM_REQUIRED(VERSION 3.14 FATAL_ERROR) PROJECT(vCPE_project) set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig") 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}) else () EXECUTE_PROCESS(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE GIT_HASH) STRING(REGEX REPLACE "\n$" "" GIT_TAG ${GIT_TAG}) STRING(REGEX REPLACE "\n$" "" GIT_HASH ${GIT_HASH}) SET(GIT_VERSION ${GIT_TAG}_${GIT_HASH}) endif () MESSAGE("Version: " ${GIT_VERSION}) ADD_SUBDIRECTORY(srcs) ADD_SUBDIRECTORY(srcs/libs) #ADD_SUBDIRECTORY(srcs/test) ADD_SUBDIRECTORY(srcs/lwip)