I want use two version of static librares in my project. And I found an answer from Restricting symbols in a Linux static library.
But I don't know how to use cmake to run following commands:
ld -r obj1.o obj2.o ... objn.o -o static1.o
objcopy --localize-hidden static1.o static2.o
ar -rcs mylib.a static2.o