commit | f69b19feed5e9ffb403db80e15117208247a9465 | [log] [tgz] |
---|---|---|
author | André Draszik <andre.draszik@jci.com> | Tue Aug 20 14:34:30 2019 +0100 |
committer | Jérôme Forissier <jerome@forissier.org> | Tue Sep 10 15:47:46 2019 +0200 |
tree | c1164eb7252dcfadcf103deef41c6ea354dfac37 | |
parent | a9ab5d03106b491ba8b44ed36f9e615669c2de4c [diff] |
cmake: support OpenSSL in non-standard locations When OpenSSL exists in a non-standard location, compilation fails: export OPENSSL_ROOT_DIR=/usr/local/openssl cmake ... make ... | gcc -Ihost/xtest/. -Ihost/xtest/adbg/include -Ihost/xtest/xml/include \ -I<user-ta>/host_include -Ihost/xtest -Ita/include \ -Ita/aes_perf/include -Ita/concurrent/include \ -Ita/concurrent_large/include -Ita/create_fail_test/include \ -Ita/crypt/include -Ita/enc_fs/include -Ita/os_test/include \ -Ita/rpc_test/include -Ita/sdp_basic/include -Ita/sha_perf/include \ -Ita/sims/include -Ita/miss/include -Ita/sims_keepalive/include \ -Ita/socket/include -Ita/storage_benchmark/include ... \ -DOPENSSL_FOUND=1 ... \ -MD -MT host/xtest/CMakeFiles/xtest.dir/regression_8100.c.o \ -MF host/xtest/CMakeFiles/xtest.dir/regression_8100.c.o.d \ -o host/xtest/CMakeFiles/xtest.dir/regression_8100.c.o \ -c host/xtest/regression_8100.c | host/xtest/regression_8100.c:17:10: fatal error: openssl/x509_vfy.h: No such file or directory | #include <openssl/x509_vfy.h> | ^~~~~~~~~~~~~~~~~~~~ | compilation terminated. The reason is that while CMake will find OpenSSL using above export, and also populate various variables to access the result, those variables aren't being used in here. In particular, CMake adds 'Imported Targets' variables that are meant to be used, OpenSSL::Crypto in this case. They serve multiple purposes: * library (file names) are abstracted away * specific include paths are added automatically to the compiler command line where needed So this here needs to switch over to using those. Note that support for OpenSSL imported targets was added in CMake v3.4 only and hence we also have to bump the minimum required version to reflect that fact. Given v3.4 was releasd in 2015, this is not deemed to be an issue. Signed-off-by: André Draszik <andre.draszik@jci.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
This git contains source code for the test suite (xtest) used to test the OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.
// OP-TEE core maintainers