CMake: Correct way to form the library