set(BENCHMARK_ENABLE_TESTING OFF)
FetchContent_Declare(benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git)
- FetchContent_MakeAvailable(benchmark)
- FetchContent_GetProperties(benchmark)
+ FetchContent_GetProperties(benchmark)
if(NOT benchmark_POPULATED)
FetchContent_Populate(benchmark)
+ add_subdirectory(${benchmark_SOURCE_DIR} ${benchmark_BINARY_DIR})
endif()
endif()
if(NOT PNG_FOUND)
FetchContent_Declare(PNG
GIT_REPOSITORY https://github.com/glennrp/libpng.git)
- FetchContent_MakeAvailable(PNG)
- FetchContent_GetProperties(PNG)
+ FetchContent_GetProperties(PNG)
if(NOT PNG_POPULATED)
FetchContent_Populate(PNG)
+ add_subdirectory(${PNG_SOURCE_DIR} ${PNG_BINARY_DIR})
endif()
endif()
- set(BENCH_APP_SRCS
+ set(BENCH_APP_SRCS
benchmark_png_encode.cc
benchmark_png_decode.cc
benchmark_main.cc
FetchContent_Declare(pigz
GIT_REPOSITORY https://github.com/madler/pigz.git
GIT_TAG ${PIGZ_TAG})
-FetchContent_MakeAvailable(pigz)
-FetchContent_GetProperties(pigz)
+FetchContent_GetProperties(pigz)
if(NOT pigz_POPULATED)
FetchContent_Populate(pigz)
endif()