View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0005747 | CMake | CMake | public | 2007-09-19 03:01 | 2008-03-14 11:37 | ||||
Reporter | bullestock | ||||||||
Assigned To | David Cole | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0005747: VS2003: CMAKE_CFG_INTDIR (and others) expands to $(OutDir) in cmake_install.cmake | ||||||||
Description | If you put INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${project}.pdb RUNTIME DESTINATION bin) in your CMakeLists.txt, this results in a cmake_install.cmake that contains e.g. FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" TYPE FILE FILES "C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.pdb") which again results in CMake complaining that FILE INSTALL cannot find file "C:/user/gh/ais/impl/build/cmake/vc7/ca/$(OutDir)/ca.pdb" to install. Using GET_TARGET_PROPERTY(PDB_LOCATION ${project} LOCATION) gives the same problem. | ||||||||
Additional Information | Using CMake 2.4.7 with "Visual Studio 7 .NET 2003" generator. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0009964) Bill Hoffman (manager) 2007-12-17 17:39 |
That is what that variable is supposed to expand to. |
(0009971) bullestock (reporter) 2007-12-18 04:13 |
> That is what that variable is supposed to expand to. Fine, which variable should I then use in my INSTALL command? |
(0010803) David Cole (manager) 2008-03-14 11:35 |
In VTK, we use this construct to install possibly config specific files (example from VTK/vtkGenerateVTKConfig.cmake): ========================================================================== SET(DOLLAR "$") # ... IF(CMAKE_CONFIGURATION_TYPES) # There are multiple build configurations. Configure one # VTKConfig.cmake for each configuration. FOREACH(config ${CMAKE_CONFIGURATION_TYPES}) SET(VTK_BUILD_TYPE_CONFIG ${config}) CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in ${VTK_BINARY_DIR}/Utilities/${config}/VTKConfig.cmake @ONLY IMMEDIATE) ENDFOREACH(config) # Install the config file corresponding to the build configuration # specified when building the install target. The BUILD_TYPE variable # will be set while CMake is processing the install files. IF(NOT VTK_INSTALL_NO_DEVELOPMENT) INSTALL(FILES ${VTK_BINARY_DIR}/Utilities/${DOLLAR}{BUILD_TYPE}/VTKConfig.cmake DESTINATION ${VTK_INSTALL_PACKAGE_DIR_CM24} COMPONENT Development ) ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT) ELSE(CMAKE_CONFIGURATION_TYPES) # There is only one build configuration. Configure one VTKConfig.cmake. SET(VTK_BUILD_TYPE_CONFIG ${CMAKE_BUILD_TYPE}) CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in ${VTK_BINARY_DIR}/Utilities/VTKConfig.cmake @ONLY IMMEDIATE) # Setup an install rule for the config file. IF(NOT VTK_INSTALL_NO_DEVELOPMENT) INSTALL(FILES ${VTK_BINARY_DIR}/Utilities/VTKConfig.cmake DESTINATION ${VTK_INSTALL_PACKAGE_DIR_CM24} COMPONENT Development ) ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT) ENDIF(CMAKE_CONFIGURATION_TYPES) ========================================================================== Try this instead of what you wrote in the original bug report: INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/\${BUILD_TYPE}/${project}.pdb RUNTIME DESTINATION bin) (notice the escaped $ sign and the reference to BUILD_TYPE which is defined in the generated cmake_install.cmake script... VTK using a DOLLAR variable is left-over from a time before CMake supported escaped dollar signs...) |
(0010804) David Cole (manager) 2008-03-14 11:37 |
See previous note explaining existing mechanism to achieve the desired result. Using ${CMAKE_CFG_INTDIR} will not be supported in INSTALL rules. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2007-09-19 03:01 | bullestock | New Issue | |
2007-11-19 10:19 | Alex Neundorf | Category | CCMake => CMake |
2007-12-17 17:39 | Bill Hoffman | Note Added: 0009964 | |
2007-12-17 17:39 | Bill Hoffman | Status | new => assigned |
2007-12-17 17:39 | Bill Hoffman | Assigned To | => Bill Hoffman |
2007-12-18 04:13 | bullestock | Note Added: 0009971 | |
2007-12-18 08:57 | Bill Hoffman | Assigned To | Bill Hoffman => David Cole |
2008-03-14 11:35 | David Cole | Note Added: 0010803 | |
2008-03-14 11:37 | David Cole | Status | assigned => resolved |
2008-03-14 11:37 | David Cole | Resolution | open => won't fix |
2008-03-14 11:37 | David Cole | Note Added: 0010804 | |
2008-03-14 11:37 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |