If the sub-project uses option (not set) for its configuration settings, then you can specify values using option before adding the subdirectory:
option(LIB_OPTION1 "" OFF)
option(LIB_OPTION2 "" ON)
add_subdirectory(${CMAKE_SOURCE_DIRECTORY}/lib)