如何让CMake知道库位于某个目录中?
我在 c:\cppunit\lib 中有一个库,在 c:\cppunit\include 中有一个头文件。 我想出了这个 cmake 文件来与库一起构建。
如何让CMake知道库位于c:/cppunit/lib中?
PROJECT( cppunitest )
INCLUDE_DIRECTORIES( "c:/cppunit/include" )
??? How to let CMake to know the library is in c:/cppunit/lib
SET( cppunitest_SRC main.cpp testset.cpp complex.cpp )
LINK_LIBRARIES(cppunit)
ADD_EXECUTABLE( cpptest ${cppunitest_SRC})
I have a library in c:\cppunit\lib, and a header files in c:\cppunit\include.
I come up with this cmake file to build with the library.
How to let CMake to know the library is in c:/cppunit/lib?
PROJECT( cppunitest )
INCLUDE_DIRECTORIES( "c:/cppunit/include" )
??? How to let CMake to know the library is in c:/cppunit/lib
SET( cppunitest_SRC main.cpp testset.cpp complex.cpp )
LINK_LIBRARIES(cppunit)
ADD_EXECUTABLE( cpptest ${cppunitest_SRC})
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你应该这样做:
You should do: