Sign in to follow this  

CMake - I don't want my string to be a list!

Recommended Posts

I am trying to set my environment variable using cmake but the result from this string

PATH=%PATH%;C:/Program Files/Autodesk/Maya2015/bin/


results in


C:/Program Files/Autodesk/Maya2015/bin/


CMake thinks the string is a list because of the semicolon. Another CMake wtf moment. Any idea how to prevent this and force the string be a string and not a list?

Share this post

Link to post
Share on other sites

Have you tried escaping the command?

Put a "\" before the semicolon, this will escape the command the semicolon does which is try and split the object into 2 objects. Not sure if this will work for cmake but it should.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this