Looks like your definition of GDCM_LIBRARY_DIR must include "${CMAKE_CFG_INTDIR}". You can't use that in an install rule... rather use "\${BUILD_TYPE}" (with an escaped dollar sign) like in the VTK install rules...<br>
<br>BUILD_TYPE is defined in a cmake_install.cmake file to qualify which configuration is being installed. (Look at the command line given to cpack from a Visual Studio build to understand this...) Why the inconsistency originally, I do not know, but changing it now would be backwards incompatible if done the easy way. If you have a good suggestion for how to make it more consistent in a backwards compatible way, I'm all ears.<br>
<div class="gmail_quote"><br>HTH,<br>David<br><br><br>On Tue, Nov 18, 2008 at 5:33 AM, Mathieu Malaterre <span dir="ltr"><<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi there,<br>
<br>
I am confused on how to use install(files...) with VS 2008 IDE. Here<br>
is what I wrote:<br>
<br>
<cmake><br>
ADD_CUSTOM_COMMAND(<br>
OUTPUT ${GDCM_LIBRARY_DIR}/gdcm_csharp.dll<br>
COMMAND ${CMAKE_CSHARP_COMPILER} ARGS "/t:library"<br>
"/out:${GDCM_LIBRARY_DIR}/gdcm_csharp.dll" "*.cs"<br>
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}<br>
DEPENDS "${swig_generated_file_fullname}"<br>
${CMAKE_CURRENT_BINARY_DIR}/AssemblyInfo.cs<br>
COMMENT "csc *.cs"<br>
)<br>
<br>
...<br>
<br>
# because gdcm_csharp.dll is constructed with custom commands, it<br>
need the INSTALL(FILES signature:<br>
INSTALL(FILES "${GDCM_LIBRARY_DIR}/gdcm_csharp.dll"<br>
DESTINATION ${GDCM_INSTALL_LIB_DIR} COMPONENT Runtime<br>
)<br>
</cmake><br>
<br>
but I am getting:<br>
<br>
1>CMake Error at Wrapping/Csharp/cmake_install.cmake:61 (FILE):<br>
1> file INSTALL cannot find file<br>
1> "C:/cygwin/home/mmalaterre/Projects/gdcm/tags/release-2010-vs2008/bin/$(OutDir)/gdcm_csharp.dll"<br>
1> to install.<br>
1>Call Stack (most recent call first):<br>
1> Wrapping/cmake_install.cmake:33 (INCLUDE)<br>
1> cmake_install.cmake:42 (INCLUDE)<br>
1>CPack Error: Error when generating package: GDCM<br>
1>Project : error PRJ0019: A tool returned an error code from<br>
"Performing Post-Build Event..."<br>
1>Build log was saved at<br>
"file://c:\cygwin\home\mmalaterre\Projects\gdcm\tags\release-2010-vs2008\PACKAGE.dir\Release\BuildLog.htm"<br>
1>PACKAGE - 1 error(s), 0 warning(s)<br>
<br>
Thank you !<br>
<font color="#888888">--<br>
Mathieu<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</font></blockquote></div><br>