X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=certs%2FCMakeLists.txt;h=933d608620bbb6bac2fd93d15b76c7317e8b73e5;hb=c5d922d7085c980edad3764687e2488a1b0907d0;hp=63f6eb0e70a1aea07c2045b7a96a61b8b64845fb;hpb=63c180a63657bc7dd55bab423ea0c2751c87310b;p=src%2Fapp-framework-main.git diff --git a/certs/CMakeLists.txt b/certs/CMakeLists.txt index 63f6eb0..933d608 100644 --- a/certs/CMakeLists.txt +++ b/certs/CMakeLists.txt @@ -1,5 +1,5 @@ ########################################################################### -# Copyright (C) 2015-2018 IoT.bzh +# Copyright (C) 2015-2020 IoT.bzh # # author: José Bollo # @@ -16,15 +16,28 @@ # limitations under the License. ########################################################################### -cmake_minimum_required(VERSION 2.8) +if(NOT USE_SDK) + install(DIRECTORY DESTINATION ${wgtpkg_trusted_certs_dir}) +endif() -set(CERTIFICATES - developer.cert.pem - partner.cert.pem - platform.cert.pem - public.cert.pem - root.cert.pem -) +if(INSTALL_SAMPLE_KEYS) + if(NOT USE_SDK) + #foreach(f root) TODO: install only root certificate + foreach(f root developer partner platform public) + install(FILES sample/${f}.cert.pem + DESTINATION ${wgtpkg_trusted_certs_dir} + RENAME sample-cert-${f}.pem + ) + endforeach(f) + endif() + foreach(f developer partner platform public) + install(FILES sample/${f}.cert.pem + DESTINATION ${wgtpkg_sample_certs_dir} + ) + install(FILES sample/${f}.key.pem + DESTINATION ${wgtpkg_sample_keys_dir} + ) + endforeach(f) +endif() -install(FILES ${CERTIFICATES} DESTINATION ${wgtpkg_trusted_cert_dir})