简体   繁体   中英

CMake Link Static .lib files

I have a library in: C:\vcpkg\installer\x86-windows-static\lib and I would like to link it via this absolute path.

The cmake file resides elsewhere, it is for an executable program (not a library).

Is it possible to link for example example_lib.lib from this absolute path?

Everywhere I read it's just about building the library, but I just want to link on it, .lib specifically.

The CMakes target_link_libraries() allows you to specify the library via an absolute path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM