<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<BR>I posted this question a few weeks ago but didn't get any replies. I've notice that most questions get answered <BR>
so I'll post it again. If it's badly written please give some feedback. Thanks /Anders<BR>
<BR>Hi,<BR>
<BR>
I am using CMake 2.6-patch 0 on Windows XP and I am generating build files for "Visual Studio 9 2008".<BR>I have some questions regarding the Install command:<BR> <BR>1) Is there a way to create a build target equal to the install/fast target that is available for the "Unix Makefiles"<BR>generator which does not depend on all the other targets?<BR> <BR>2) I am using the "Optional" argument when calling the Install command. However, in the case of shared libraries, the <BR>"Visual Studio 9 2008" install scripts exit when a file to install is not present. I have tested this using the "Unix Makefiles" <BR>generator and there it seems to work as expected. For example I have:<BR> <BR>ADD_LIBRARY(my_target SHARED source1.cpp source2.cpp)<BR>INSTALL(TARGETS my_target DESTINATION lib LIBRARY OPTIONAL)<BR> <BR>This generates an install script. A part of this looks like:<BR> <BR>IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$")<BR> IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")<BR> FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "path/my_target.lib")<BR> ENDIF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")<BR>ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$")<BR> <BR>IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$")<BR> IF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")<BR> FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES "path/my_target.dll")<BR> ENDIF("${CMAKE_INSTALL_CONFIG_NAME}" MATCHES "^([Dd][Ee][Bb][Uu][Gg])$")<BR> ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" MATCHES "^(Unspecified)$")<BR> <BR>When the dll has not been build the install script exits. As i see it the second FILE command for the dll file is the problem, <BR>it does not contain the OPTIONAL command and therefore makes the script exit. Is this correct or did I misunderstand <BR>something here? If this is the problem, is there a workaround?<BR> <BR>Thanks<BR>/Anders<BR><BR><BR>
<HR>
<BR>
Dela foton på ett smidigt sätt med Windows LiveT Photos. <A href="http://www.microsoft.com/windows/windowslive/products/photos.aspx">Dra och släpp</A><BR><br /><hr />Med Windows Live kan du ordna, redigera och <a href='http://www.microsoft.com/sverige/windows/windowslive/products/photo-gallery-edit.aspx' target='_new'>dela med dig av dina foton.</a></body>
</html>