0
0
Fork 0
wireless-proxy-esp32/project_components/wt_system/CMakeLists.txt

27 lines
753 B
CMake

file(GLOB SOURCES *.c
)
idf_component_register(
SRCS ${SOURCES}
INCLUDE_DIRS "."
PRIV_REQUIRES
global_resource esp_app_format api_router
)
# Execute the Git command to get the formatted commit date
execute_process(
COMMAND git show -s --format=%cd --date=format:'%Y-%m-%d'
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE FM_DATE
RESULT_VARIABLE result
ERROR_VARIABLE git_error
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT "${result}" STREQUAL "0")
message(WARNING "Git command failed with: ${git_error}")
endif()
target_compile_definitions(${COMPONENT_LIB} PRIVATE FW_UPD_DATE="${FM_DATE}")
idf_component_set_property(${COMPONENT_NAME} WHOLE_ARCHIVE ON)