[CMake] Adding .pdb files to CPack (Visual Studio 7 generator)

2007-09-18 Thread Torsten Martinsen
In a macro, I succesfully use
 
   INSTALL(
  TARGETS ${project}
  RUNTIME DESTINATION bin)

to add my .exe file to the list of files included by CPack. I also want
the .pdb file, so I tried
 
  INSTALL(
 FILES
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${project}.pdb
 RUNTIME DESTINATION bin)

This, unfortunately, gives the error

FILE INSTALL cannot find file
"C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.pdb" to install.

Note that ${CMAKE_CFG_INTDIR} expands to "$(OutDir)" instead of e.g.
"Debug" as I had hoped.
 
-Torsten

This e-mail and any files sent with it contain information that may be 
privileged or confidential and is the property of the GateHouse Group. This 
information is intended solely for the person to whom it is addressed. If you 
are not the intended recipient, you are not authorized to read, print, retain, 
copy, disseminate, distribute, or use the message or any part thereof. If you 
have received this e-mail in error, please notify the sender immediately, and 
delete all copies of this message. In accordance with GateHouse Security 
Policy, e-mails sent or received may be monitored. 
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Adding .pdb files to CPack (Visual Studio 7 generator)

2007-09-18 Thread Hendrik Sattler
Am Dienstag 18 September 2007 schrieb Torsten Martinsen:
> In a macro, I succesfully use
>
>INSTALL(
>   TARGETS ${project}
>   RUNTIME DESTINATION bin)
>
> to add my .exe file to the list of files included by CPack. I also want
> the .pdb file, so I tried
>
>   INSTALL(
>  FILES
> ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${project}.pdb
>  RUNTIME DESTINATION bin)
>
> This, unfortunately, gives the error
>
>   FILE INSTALL cannot find file
> "C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.pdb" to install.
>
> Note that ${CMAKE_CFG_INTDIR} expands to "$(OutDir)" instead of e.g.
> "Debug" as I had hoped.

Did you try using the LOCATION property of the TARGET stripping the extension 
and using that?

HS
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


RE: [CMake] Adding .pdb files to CPack (Visual Studio 7 generator)

2007-09-18 Thread Torsten Martinsen
Hendrik Sattler <> wrote:

> Did you try using the LOCATION property of the TARGET stripping the
> extension and using that?

Not until now, but: The LOCATION property expands to e.g.
"C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.exe", so that is
also no good.

-Torsten

This e-mail and any files sent with it contain information that may be 
privileged or confidential and is the property of the GateHouse Group. This 
information is intended solely for the person to whom it is addressed. If you 
are not the intended recipient, you are not authorized to read, print, retain, 
copy, disseminate, distribute, or use the message or any part thereof. If you 
have received this e-mail in error, please notify the sender immediately, and 
delete all copies of this message. In accordance with GateHouse Security 
Policy, e-mails sent or received may be monitored. 
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


RE: [CMake] Adding .pdb files to CPack (Visual Studio 7 generator)

2007-10-12 Thread Torsten Martinsen
Torsten Martinsen <> wrote:

> Hendrik Sattler <> wrote:
>
>> Did you try using the LOCATION property of the TARGET stripping the
>> extension and using that?
>
> Not until now, but: The LOCATION property expands to e.g.
> "C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.exe", so that is
> also no good.

For future reference, I ended up with this solution:

   # First, build the full name of the EXE.
   INSTALL(CODE "SET(PDB_FULL_PATH
${CMAKE_CURRENT_BINARY_DIR}/\${${project}_BUILD_NAME_\${CMAKE_INSTALL_CO
NFIG_NAME}})")
   # Then, replace .exe with .pdb.
   INSTALL(CODE "STRING(REPLACE .exe .pdb PDB_FULL_PATH
\${PDB_FULL_PATH})")
   # Finally, get it installed.
   INSTALL(CODE "FILE(INSTALL DESTINATION
\"\${CMAKE_INSTALL_PREFIX}/\${CMAKE_INSTALL_CONFIG_NAME}\" TYPE
EXECUTABLE FILES \${PDB_FULL_PATH})")

The trick is to postpone evaluation of the CPack variables until CPack
runs. Not pretty, but it works.

-Torsten

This e-mail and any files sent with it contain information that may be 
privileged or confidential and is the property of the GateHouse Group. This 
information is intended solely for the person to whom it is addressed. If you 
are not the intended recipient, you are not authorized to read, print, retain, 
copy, disseminate, distribute, or use the message or any part thereof. If you 
have received this e-mail in error, please notify the sender immediately, and 
delete all copies of this message. In accordance with GateHouse Security 
Policy, e-mails sent or received may be monitored.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake