diff options
Diffstat (limited to 'infra/cmake/packages/GFlagsSourceConfig.cmake')
-rw-r--r-- | infra/cmake/packages/GFlagsSourceConfig.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/infra/cmake/packages/GFlagsSourceConfig.cmake b/infra/cmake/packages/GFlagsSourceConfig.cmake new file mode 100644 index 000000000..3e70d89fc --- /dev/null +++ b/infra/cmake/packages/GFlagsSourceConfig.cmake @@ -0,0 +1,18 @@ +function(_GFlagsSource_import) + if(NOT DOWNLOAD_GFLAGS) + set(GFlagsSource_FOUND False PARENT_SCOPE) + return() + endif(NOT DOWNLOAD_GFLAGS) + + nnas_include(ExternalSourceTools) + nnas_include(OptionTools) + + envoption(GFLAGS_URL https://github.com/gflags/gflags/archive/v2.2.1.tar.gz) + + ExternalSource_Download(GFLAGS ${GFLAGS_URL}) + + set(GFLAGS_SOURCE_DIR ${GFLAGS_SOURCE_DIR} PARENT_SCOPE) + set(GFlagsSource_FOUND True PARENT_SCOPE) +endfunction(_GFlagsSource_import) + +_GFlagsSource_import() |