Reputation: 89
I am newbie. I have compiled OpenSSL's libcrypto.a in shell, but could not link it to my Firebreath plugin. I have added in CMakeLists.txt:
target_link_libraries(${CURPROJECT} /path/to/libcrypto.a)
But CMake gives error:
Cannot specify link libraries for target "/path/to/libcrypto.a" which is not build by this project
I am using MacOSX 10.9, XCode 5.1.1, FireBreath 1.7, OpenSSL 1.0.1i.
Please explain to me, how could I link libcrypto.a to my plugin?
Upvotes: 1
Views: 554
Reputation: 14324
The error message you're getting indicates that it thinks you're trying to add a link library for the project /path/to/libcrypto.a
, not that you are trying to add the link library /path/to/libcrypto.a
to the project $(CURPROJECT)
.
This might be because you need to do ${CURPROJECT}
(cmake variables use {}
not ()
). It could also be that the variable CURPROJECT
isn't defined.
Your command is correct, but the parameters you are passing into it are not. You might also consider using find_library to find libcrypto.a.
Of course, with Mac OS you should already have openssl available, so you shouldn't need to specify the path. Also, as @hasa mentioned, you are probably better off just using the firebreath openssl stuff, which is experimental but really just on windows -- mac OS it just uses the existing ones. It's only marked experimental because I'm not willing to provide support for the windows binaries.
Upvotes: 2
Reputation: 206
Have you already tested the "experimental" built-in openssl support described here:
Upvotes: 2