CMake GUI failed to create directory in /opt/local/
You say this:


  I’m able to build the library in other places…


But it’s choking here:


  /opt/local/DESTINATION_PATH


While I have not used CMake, in general Unix/Linux context the problem is the /opt/local/ directory would be owned by root. And if you want to create content in there, you would need to launch CMake via sudo so you can gain super user privileges.

According to this answer on Stack Overflow you can do it like this. First open up the terminal command line and type in this command:

sudo /Applications/CMake.app/Contents/MacOS/CMake


Next it will ask you for your password. Go ahead and type that in. And when CMake launches it will be via sudo so writing to /opt/local/ should not be an issue.