[CMake] Cannot add library to the static library in Visual Studio 2008
Dupi
nefreyu at gmail.com
Sat Feb 14 09:35:45 EST 2009
Hi all.
I have problem with adding ode library to the static library in Visual
Studio 2008. My project name is oxygen and it is depend from ODE library
version 0.9
(http://downloads.sourceforge.net/opende/ode-win32-0.9.zip?modtime=119217675
3
<http://downloads.sourceforge.net/opende/ode-win32-0.9.zip?modtime=119217675
3&big_mirror=0> &big_mirror=0 ). CMakeLists.txt file for oxygen include
following lines:
# include all headers of project (.h)
set(oxygen_LIB_HDRS .... )
#include all source files of project (.cpp)
set(oxygen_LIB_SRCS ....)
#include directory of ODE library. Value ODE_INCLUDE_DIR is
C:/library/ode/include. Also this value is added into VS project (Project
properties -> Configuration Properties ->C/C++->General->Additional Include
Directories)
include_directories(${ODE_INCLUDE_DIR})
#create static library oxygen.lib
add_library(oxygen STATIC ${oxygen_LIB_SRCS} ${oxygen_LIB_HDRS})
#add ode.lib to the oxygen. Value ODE_LIBRARY is
C:/library/ode/lib/releaselib/ode.lib. But this value is not added into VS
project (Project properties -> Configuration Properties
->Librarian->General->Additional Dependencies)
target_link_libraries(oxygen ${ODE_LIBRARY})
If I change project from static library (lib) to the dynamic library (dll)
(change values add_library to the (oxygen SHARED ${oxygen_LIB_SRCS}
${oxygen_LIB_HDRS})), value ODE_LIBRARY
(C:/library/ode/lib/releaselib/ode.lib) is added into VS Project. I finding
solution about one week but still nothing.
Thank you for every advice.
Marian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090214/6fb53546/attachment.htm>
More information about the CMake
mailing list