2011-01-11 6 views
2

私はc:\ cppunit \ libにライブラリがあり、c:\ cppunit \ includeにヘッダファイルがあります。 このcmakeファイルをライブラリと一緒にビルドします。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}) 

答えて

4

あなたは実行する必要があります。

LINK_DIRECTORIES("c:/cppunit/lib") 
ADD_EXECUTABLE(cpptest ${cppunitest_SRC}) 
LINK_LIBRARIES(cpptest cppunit) 
関連する問題