diff --git a/cmake/zlib/CMakeLists.txt.in b/cmake/zlib/CMakeLists.txt.in index 3b65da0..016e83f 100644 --- a/cmake/zlib/CMakeLists.txt.in +++ b/cmake/zlib/CMakeLists.txt.in @@ -21,7 +21,7 @@ ExternalProject_Add(zlib URL_HASH SHA256=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 # 2020-04-23 SOURCE_DIR "${CMAKE_BINARY_DIR}/zlib-src" PATCH_COMMAND patch -p1 - < "${CMAKE_SOURCE_DIR}/sandboxed_api/bazel/external/zlib.patch" + < "@SAPI_SOURCE_DIR@/sandboxed_api/bazel/external/zlib.patch" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/sandboxed_api/examples/CMakeLists.txt b/sandboxed_api/examples/CMakeLists.txt index ef03706..d7dd6cc 100644 --- a/sandboxed_api/examples/CMakeLists.txt +++ b/sandboxed_api/examples/CMakeLists.txt @@ -12,8 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -if(SAPI_ENABLE_EXAMPLES) +if(SAPI_ENABLE_EXAMPLES OR SAPI_ENABLE_TESTS) + # TODO(cblichmann): These are depended on by sapi::sapi_test add_subdirectory(stringop) add_subdirectory(sum) +endif() + +if(SAPI_ENABLE_EXAMPLES) add_subdirectory(zlib) endif()