'How to link library in cmake [Clion project]
So, I'm trying to run Playsound using code from here,
How to PlaySound in C++ using Windows API?
So following advice from here, https://stackoverflow.com/a/41909627/13519865
I added these lines to cmake
find_library(TEST_LIB winmm lib)
target_link_libraries(drum_kit LINK_PUBLIC "${TEST_LIB}")
But I'm getting these error
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TEST_LIB
linked by target "drum_kit" in directory C:/Users/Cyber/CLionProjects/drum_kit
It is clear that I'm not linking the library properly, how it should be actually done, can anyone help me?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
