1

So, in Visual Studio this process was quite simple - download library, build using MSVC and add it to linker in the project properties. What about CLion?

How do I manage to add, for example Crypto++ library into my project with CLion?

From what I have learned, CLion depends on CMake so I should rather use CMakeLists.txt file to process every dependencies for my project, however in order to use something like find_package(CryptoPP REQUIRED) there I need to register it somehow?

What are the steps for proper library installation in CLion?

jww
  • 97,681
  • 90
  • 411
  • 885
RA.
  • 969
  • 13
  • 36
  • Possible duplicate of [Using Crypto++ in Clion IDE](https://stackoverflow.com/q/32696855/608639) and [CLion and Crypto++ library](https://stackoverflow.com/q/46989046/608639). If you provide more details, like your CLion project file, we may be able to provide more help. – jww Oct 13 '18 at 00:03
  • @jww Hi. These questions are not related to my problem specifically. I was asking for the detailed steps on how to include/compile a library for a specific project in CLion, including linking. Nothing about the `Crypto++` library, as it was just an example library given (hence no proper tag). Today I know, that CMake should be used - unlike in, for instance, the Visual Studio which has it's own compiler. Thank you. – RA. Oct 13 '18 at 11:49

1 Answers1

0

This will get you on the right track.

add_library(target_name source_files)

And if you want to build a dynamic library, you can use add_library(target_name SHARED source_files)

Source: https://stackoverflow.com/a/30473299/10718073

Community
  • 1
  • 1
Scott S.
  • 1
  • 3