I've generated libBox2D.a
. Now I want to import it to C++ project, but I don't know how. How I can import my libBox2D.a
to my project using CMake?
Try this:
find_library(LIBBOX2D Box2D DIRECTORY)
where replace DIRECTORY with the location of libBox2D.a
. Then you can link this library to your executable:
target_link_libraries(exec ${LIBBOX2D})