Cmake Examples, Demos, and Thorvg always building

Description

I implemented lvgl v9.0.0 into my cmake project. The following is my cmake code. It seems to build fine but it always builds the examples, demo, and thorvg even when I have the defines to disable them in lv_conf.h.

# LVGL ---------------------------------------------------------------------------------------------
# Specify path to own LVGL config header
set(LV_CONF_PATH
    ${CMAKE_CURRENT_SOURCE_DIR}/../App/lv_conf.h
    CACHE STRING "" FORCE)
message("LVGL Conf Path: " ${LV_CONF_PATH})

set(LV_VERSION "v9.0.0") # this string represents the Tag name of the release desired - Change the GIT_TAG below as well
message("Fetching LVGL " ${LV_VERSION})

# Fetch lvgl
FetchContent_Declare(
  lvgl
  GIT_REPOSITORY https://github.com/lvgl/lvgl
  GIT_TAG       v9.0.0 
)

FetchContent_MakeAvailable(
  lvgl
)
target_compile_definitions(lvgl PRIVATE

   # Add user defined symbols
   LV_CONF_BUILD_DISABLE_EXAMPLES
   LV_CONF_BUILD_DISABLE_DEMOS

)
message("Fetching LVGL Done")
target_link_libraries(${CMAKE_PROJECT_NAME}
   stm32cubemx
   lvgl::lvgl

   # Add user defined libraries
)
# LVGL ---------------------------------------------------------------------------------------------

Inside lv_conf.h

#define LV_CONF_BUILD_DISABLE_EXAMPLES 1
#define LV_CONF_BUILD_DISABLE_DEMOS 1
#define LV_CONF_BUILD_DISABLE_THORVG_INTERNAL 1

What MCU/Processor/Board and compiler are you using?

STM32 with Cmake. I followed this page for setup: STM32 — LVGL documentation

What LVGL version are you using?

v9.0.0

What do you want to achieve?

Find out why my defines are not changing the build instructions.

What have you tried so far?

Putting the defines in the CMakeList.txt and inside lv_conf.h. I also found this forum post here: Disabling LV_BUILD_EXAMPLES in lv_conf.h but still it gets build
but they changed it inside env_support/cmake/custom.cmake. Where the docs say to fetchcontent and therefore I dont have access to env_support/cmake/custom.cmake.

Code to reproduce

Code above

Screenshot and/or video

image

I reverted to v8.4.0 and the LV_BUILD_EXAMPLES actually effects it. Setting it to 0, it then doesnt build the examples.