Update CMake logic making external libs global