<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<BR>
Hi,<BR>
<BR>
I am using CMake 2.6-patch 0 on Windows XP and I am generating build files for "Visual Stuiod 9 2008".<BR>
I have quertions regaring the Install command:<BR>
<BR>
1) Is there a way to create a build target euqal 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 Stuiod 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 therefor makes the script exit. Is this correct or did I missunderstand <BR>
something here? If this is the problem, is there a workaround?<BR>
<BR>
Thanks<BR>
/Anders<BR><br /><hr />Dela foton på ett smidigt sätt med Windows LiveT Photos. <a href='http://www.microsoft.com/windows/windowslive/products/photos.aspx' target='_new'>Dra och släpp</a></body>
</html>