This question has been asked before but the solutions assume that you are acquainted with OS X, unfortunately I'm not, so please bear with me. I would like to use qmake
from the terminal command. With Yosemite, I'm not able to find an easy way to do it. The solution is suggested here but I can't figure out how to use it. The solution is as follows
In previous releases of OS X (Mavericks, Mountain Lion, Lion, ...), environment variables are configured in the /etc/launchd.conf file. As of OS X Yosemite, this is no longer working. To configure environment variables, you can do the following
$ nano ~/Library/LaunchAgents/my.startup.plist
my.startup.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>my.startup</string> <key>ProgramArguments</key> <array> <string>sh</string> <string>-c</string> <string>launchctl setenv $VARIABLE_NAME $VARIABLE_VALUE</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
In my case, the path to qmake
is /Users/XXXX/Qt/5.4/clang_64/bin
, what should I do so that the qmake
will be recognized in the terminal command?
qmake
? I.e., you want to add the path to qmake to yourPATH
? – deceze♦