[CMake] INSTALL(FILES ... ) and $(OutDir)

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Nov 18 05:33:50 EST 2008


Hi there,

  I am confused on how to use install(files...) with VS 2008 IDE. Here
is what I wrote:

<cmake>
  ADD_CUSTOM_COMMAND(
    OUTPUT ${GDCM_LIBRARY_DIR}/gdcm_csharp.dll
    COMMAND ${CMAKE_CSHARP_COMPILER} ARGS "/t:library"
"/out:${GDCM_LIBRARY_DIR}/gdcm_csharp.dll" "*.cs"
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    DEPENDS "${swig_generated_file_fullname}"
      ${CMAKE_CURRENT_BINARY_DIR}/AssemblyInfo.cs
    COMMENT "csc *.cs"
  )

...

  # because gdcm_csharp.dll is constructed with custom commands, it
need the INSTALL(FILES signature:
  INSTALL(FILES "${GDCM_LIBRARY_DIR}/gdcm_csharp.dll"
    DESTINATION ${GDCM_INSTALL_LIB_DIR} COMPONENT Runtime
  )
</cmake>

but I am getting:

1>CMake Error at Wrapping/Csharp/cmake_install.cmake:61 (FILE):
1>  file INSTALL cannot find file
1>  "C:/cygwin/home/mmalaterre/Projects/gdcm/tags/release-2010-vs2008/bin/$(OutDir)/gdcm_csharp.dll"
1>  to install.
1>Call Stack (most recent call first):
1>  Wrapping/cmake_install.cmake:33 (INCLUDE)
1>  cmake_install.cmake:42 (INCLUDE)
1>CPack Error: Error when generating package: GDCM
1>Project : error PRJ0019: A tool returned an error code from
"Performing Post-Build Event..."
1>Build log was saved at
"file://c:\cygwin\home\mmalaterre\Projects\gdcm\tags\release-2010-vs2008\PACKAGE.dir\Release\BuildLog.htm"
1>PACKAGE - 1 error(s), 0 warning(s)

Thank you !
-- 
Mathieu


More information about the CMake mailing list