Linking external .dll with CMake
-
Hello, I have recently trying to migrate my project from Qt5 qmake to Qt6 cmake.
I would like to link external .dll files to be used for the project. In particular LibVLC which has libvlc.dll and libvlccore.dll.In qmake all I had to do was this:
INCLUDEPATH += "../LibVLC/include" LIBS += -L"../LibVLC" -lvlc -lvlccoreBut I'm unsure what to actually put in cmake to use the dll files since I'm very new to it.
I was at least able to link the source code directory with:INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/External/LibVLC/include) -
-
@SGaist Thanks for the reply, they didn't provide the .lib files in the source code, so I had to generate them myself. I was able to find https://wiki.videolan.org/GenerateLibFromDll explaining how to do it and got the application to run now, thanks!
-
B BrianL has marked this topic as solved