I don't think it will help with your problem, but it would seem to make more sense to use the following:
Code: [Select]
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON...