Build examples conditionally, build only the library.