wjakob / tbb

Intel TBB with CMake build system
Apache License 2.0
369 stars 161 forks source link

How to use the built library #82

Open wwdok opened 2 years ago

wwdok commented 2 years ago

Hello, i am new to cmake and tbb, so i ask the question... I git clone this repo, and build it with vscode cmake on Windows successfully: image it generates a lot of files in build directory, i found the library locate in the Release subdirectory: image Then i add following lines in my project's CMakeLists.txt:

include_directories("D:/Dependency/tbb/include")
add_library (tbb_lib STATIC IMPORTED)
set_target_properties( tbb_lib PROPERTIES IMPORTED_LOCATION "D:/Dependency/tbb/build/Release/tbb.lib" )

cmake tells me LINK : fatal error LNK1104: cannot open file 'tbb.lib'