Rearranging libraries (cmake)