build the library with modern cmake

Is it a good method to build .dll or .lib for modern cmake?