MantisBT - CMake
View Issue Details
0014840CMakeCMakepublic2014-03-26 04:092014-03-28 03:48
th.thielemann 
Eric NOULARD 
normalminoralways
closedno change required 
VMwareLinuxUbuntu 12.04 LTS
CMake 2.8.12.1 
 
0014840: install can not handle "~"
Tried to install into a subfolder of users home on linux. Used the shortcut "~" for this.


Not working:
set("DROP_FOLDER" "~/localdropfolder")
...
install(DIRECTORY ${PROJECT_SOURCE_DIR}/qml DESTINATION "${DROP_FOLDER}" )

But this is working:

set("DROP_FOLDER" "~/localdropfolder")
get_filename_component(QML_PATH_ABSOLUT "${DROP_FOLDER}" ABSOLUTE)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/qml DESTINATION "${QML_PATH_ABSOLUT}" )
No tags attached.
Issue History
2014-03-26 04:09th.thielemannNew Issue
2014-03-26 04:15Eric NOULARDNote Added: 0035516
2014-03-28 02:56th.thielemannNote Added: 0035546
2014-03-28 03:48Eric NOULARDNote Added: 0035548
2014-03-28 03:48Eric NOULARDStatusnew => closed
2014-03-28 03:48Eric NOULARDAssigned To => Eric NOULARD
2014-03-28 03:48Eric NOULARDResolutionopen => no change required

Notes
(0035516)
Eric NOULARD   
2014-03-26 04:15   
AFAIK ~ expansion is the responsibility of the underlying shell
so relying on its expansion is not portable.

Couldn't you use $ENV{HOME} instead ?
(0035546)
th.thielemann   
2014-03-28 02:56   
Oh. I did not thought about that. I will try it. Ticket can be closed.
(0035548)
Eric NOULARD   
2014-03-28 03:48   
Closing on reporter request.
using $ENV{HOME} should work.