If you simply want to enable/disable some parts of that library, you can simply set the appropriate options before calling ADD_SUBDIRECTORY
.
Simply use the same OPTION commands as in the library's CMakeLists.txt
but set them ON
/OFF
as you need. Of course, oyu are free to change/choose the describing string as you like.
Alternatively (and if options have a different value than true/false), you can use the SET(.... CACHE ... )
e.g.
SET(BUILD_CPP TRUE CACHE BOOL "Build C++ Library (currently header only)")
Similar question: Override option in CMake subproject