Add dependencies ms visual studio gtest4/19/2024 The PRIVATE keyword indicates that fmt is only needed for building HelloWorld and should not propagate to other dependent projects. target_link_libraries(HelloWorld PRIVATE fmt::fmt): Specifies that the HelloWorld executable should link against the fmt library.add_executable(HelloWorld helloworld.cpp): Adds an executable target named "HelloWorld," built from the source file helloworld.cpp.The REQUIRED keyword ensures that an error is generated if the package is not found. find_package(fmt CONFIG REQUIRED): Looks for the fmt library using its CMake configuration file.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |