set(COMPONENTS_INC_PATH 
    ""
    CACHE PATH
    "path to the components include directory"
)

set(COMPONENTS_SRC_PATH 
    ""
    CACHE PATH
    "path to the components srouce directory"
)

file(GLOB_RECURSE COMPONENTS_INC_FILE_PATH_LIST "${CMAKE_SOURCE_DIR}/src/components/*.h")
file(GLOB_RECURSE COMPONENTS_SRC_PATH_LIST "${CMAKE_SOURCE_DIR}/src/components/*.c")

foreach(COMPONENTS_INC_FILE_PATH ${COMPONENTS_INC_FILE_PATH_LIST})
    get_filename_component(COMPONENTS_INC_DIR_PATH ${COMPONENTS_INC_FILE_PATH} DIRECTORY)
    list(APPEND COMPONENTS_INC_PATH_LIST ${COMPONENTS_INC_DIR_PATH})
endforeach()

list(APPEND COMPONENTS_INC_PATH ${COMPONENTS_INC_PATH_LIST})
list(APPEND COMPONENTS_SRC_PATH ${COMPONENTS_SRC_PATH_LIST})

message(STATUS "COMPONENTS_INC_PATH: ${COMPONENTS_INC_PATH}")
message(STATUS "COMPONENTS_SRC_PATH: ${COMPONENTS_SRC_PATH}")
