CMAKE_ARGS has never been supported for any version of FetchContent. Regardless of whether you were using FetchContent_Populate()
or FetchContent_MakeAvailable()
, the configure step has never been invoked by the sub-build. Whatever you were expecting CMAKE_ARGS to do, it wasn’t having any effect and at best was being silently ignored (and continues to be).
How am I to set cmake configure args for this?
I explained what you need to do in my previous reply. It would look something like this (with the caveats as noted in that previous reply):
include(FetchContent)
FetchContent_Declare(
glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/glfw-src"
GIT_TAG "master"
GIT_SHALLOW TRUE
)
set(GLFW_BUILD_WAYLAND ON)
set(GLFW_BUILD_X11 OFF)
FetchContent_MakeAvailable(glfw)