So I've been wanting to learn C++, I have a student license for CLion and am familiar with other software from the company so I'd want to use it if possible. Using MSYS2 seemed like a good way to easily manage libraries, since that tends to be hellish anytime I tried working with C++.
MSYS2 seemed intuitive enough and I managed to install the OpenCV library as a test. However, I'm now entirely at a loss on how I'd link it with CLion.
I've been reading about CMake files, and this is what I figured should be mine:
cmake_minimum_required(VERSION 3.7)
project(letsee)
set(CMAKE_CXX_STANDARD 11)
find_package (OpenCV REQUIRED)
set(SOURCE_FILES main.cpp)
add_executable(letsee ${SOURCE_FILES})
target_link_libraries( letsee ${OpenCV_LIBS} )
The last line, however, is supposed to link to be an environment variable. I understand that MSYS2 should handle that somehow, or perhaps I should create my own windows environment variable? Either way I'm not even sure to where I'd link such variable. I'm just incredibly confused by this point. How can no one have created an intuitive way to handle this in windows in a 40 year old language.