Imported Upstream version 1.8.0
[platform/core/ml/nnfw.git] / infra / cmake / packages / Pybind11SourceConfig.cmake
1 function(_Pybind11Source_import)
2   if(NOT DOWNLOAD_PYBIND11)
3     set(Pybind11Source_FOUND FALSE PARENT_SCOPE)
4     return()
5   endif(NOT DOWNLOAD_PYBIND11)
6
7   nnas_include(ExternalSourceTools)
8   nnas_include(OptionTools)
9
10   envoption(PYBIND11_URL https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz)
11
12   ExternalSource_Download(PYBIND11 ${PYBIND11_URL})
13
14   set(Pybind11Source_DIR ${PYBIND11_SOURCE_DIR} PARENT_SCOPE)
15   set(Pybind11Source_FOUND TRUE PARENT_SCOPE)
16 endfunction(_Pybind11Source_import)
17
18 _Pybind11Source_import()