I'm trying to get CMake under CLion to build a simple program that links with the curl library. From the command line it builds like this:
gcc main.c -l curl
I can't get CMake to link with the curl library however:
cmake_minimum_required(VERSION 3.15) project(http_examples_c C) set(CMAKE_C_STANDARD 99) add_executable(http_examples_c main.c) target_link_libraries(/usr/lib/x86_64-linux-gnu/libcurl.a) How do I tell CMake to just link with the curl library?