title: How to add linker directory in cmake?
body: <p>I am using clion for my c++ project. The command I need to run is:
  <code>g++ server.cpp -L/usr/lib -lssl -lcrypto -o server</code></p>
  
  <p>I have tried:</p>
  
  <p><code>SET(GCC_COVERAGE_LINK_FLAGS    "-L/usr/lib -lssl -lcrypto")
  add_definitions(${GCC_COVERAGE_COMPILE_FLAGS})
  </code>
  as mentioned <a href="https://stackoverflow.com/questions/11783932/how-do-i-add-a-linker-or-compile-flag-in-a-cmake-file">here</a></p>
  
  <p>Also tried:</p>
  
  <p><code>include_directories(/usr/inc)
  link_directories(/usr/lib)
  SET(GCC_COVERAGE_LINK_FLAGS    "-lssl -lcrypto")
  </code>
  mentioned <a href="https://stackoverflow.com/questions/28597351/how-do-i-add-a-library-path-in-cmake">here</a>.</p>
  
  <p>Nothing seems to be working. I am new to cmake. Can someone explain a solution and some good tutorial/resource to follow.</p>
  
  <p>Edit: Error that I get is undefined reference to `PKCS5_PBKDF2_HMAC_SHA1' which is a funciton in openssl/evp.h</p>
  
  <p>Following is run by clion: 
  /"path to clion"/clion-2018.3.1/bin/cmake/linux/bin/cmake -S"Path to project" -B"Path to project/cmake-build-debug" --check-build-system CMakeFiles/Makefile.cmake 0
  /usr/bin/make -f CMakeFiles/server.o.dir/build.make CMakeFiles/server.o.dir/server.cpp.o</p>