1 include(ExternalProject)
4 set (PBM_PREFIX protobuf_mutator)
7 set(PBM_PATH ${CMAKE_CURRENT_BINARY_DIR}/${PBM_PREFIX}/src/${PBM_PREFIX})
8 set(PBM_LIB_PATH ${PBM_PATH}-build/src/libprotobuf-mutator.a)
9 set(PBM_FUZZ_LIB_PATH ${PBM_PATH}-build/src/libfuzzer/libprotobuf-mutator-libfuzzer.a)
11 ExternalProject_Add(${PBM_PREFIX}
13 GIT_REPOSITORY https://github.com/google/libprotobuf-mutator.git
15 CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
16 CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
17 -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
18 BUILD_BYPRODUCTS ${PBM_LIB_PATH} ${PBM_FUZZ_LIB_PATH}
23 set(ProtobufMutator_INCLUDE_DIRS ${PBM_PATH})
24 set(ProtobufMutator_LIBRARIES ${PBM_FUZZ_LIB_PATH} ${PBM_LIB_PATH})