The package libtwolame can be imported via CMake FindPkgConfig module: find_package(PkgConfig REQUIRED) pkg_check_modules(twolame REQUIRED IMPORTED_TARGET twolame) target_link_libraries(main PkgConfig::twolame)