vcpe/CMakeLists.txt

31 lines
823 B
CMake
Raw Normal View History

2022-05-10 02:59:51 +00:00
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})
2022-05-10 02:59:51 +00:00
else ()
EXECUTE_PROCESS(COMMAND git rev-parse --short HEAD
OUTPUT_VARIABLE GIT_HASH)
2022-05-10 02:59:51 +00:00
STRING(REGEX REPLACE "\n$" "" GIT_TAG ${GIT_TAG})
STRING(REGEX REPLACE "\n$" "" GIT_HASH ${GIT_HASH})
SET(GIT_VERSION ${GIT_TAG}_${GIT_HASH})
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)
#ADD_SUBDIRECTORY(srcs/test)
2022-05-27 07:49:45 +00:00
ADD_SUBDIRECTORY(srcs/lwip)