I’m not an expert in cmake, but that’s how I got it working. The find_package should complain to CLion’s cmake tab if it doesn’t find it. For me, the header files start working properly only after the target_link_libraries finds the correct libraries.
These two threads helped me to get the compilation working,