The offical µGFX repository.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

51 lines
1.0 KiB

# Define UGFX_ROOT
set(UGFX_ROOT ${CMAKE_CURRENT_LIST_DIR}/..)
# Ensure that CHIBIOS_ROOT is set
if(NOT UGFX_ROOT)
message(FATAL_ERROR "No UGFX_ROOT specified")
endif()
# Assemble list of components
list(APPEND ugfx_COMPONENTS
gadc
gaudio
gdisp
gdriver
gevent
gfile
ginput
gmisc
gos
gqueue
gtimer
gtrans
gwin
)
# Core sources
list(APPEND ugfx_SOURCES
${UGFX_ROOT}/src/gfx.c
)
# Core include directories
list(APPEND ugfx_INCLUDE_DIRS
${UGFX_ROOT}
${UGFX_ROOT}/src
)
# Include each component
foreach(component ${ugfx_COMPONENTS})
include(${UGFX_ROOT}/src/${component}/${component}.cmake)
endforeach()
# Include target setup for ease-of-use
include(${CMAKE_CURRENT_LIST_DIR}/target_setup.cmake)
# Remove duplicates from non-cached variables
list(REMOVE_DUPLICATES ugfx_SOURCES)
list(REMOVE_DUPLICATES ugfx_INCLUDE_DIRS)
# Outsource heavy-lifting to cmake
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ugfx DEFAULT_MSG ugfx_SOURCES ugfx_INCLUDE_DIRS)