For almost 3 years of using CMake in my opensource project, I everytime encounter the verbosity of CMake scripts. So now I have written a small library of shorthand utility macros.
At this time it have some macros specific for my project, but I hope others can find it useful too.
List of macros:
1. fwgs_install -- installs library file. On MSVC installs in separate directories, corresponding to selected configuration in Visual Studio. For Debug it also installs PDB file automatically.
2. fwgs_conditional_subproject -- adds subdirectory if conditions was met. I did this because there is some subdirectories, which can be omitted in some configurations.
3. fwgs_set_default_properties -- default properties for target. For me it enables PIC and removes "lib" prefix on Windows.
4. fwgs_string_option -- option() but for strings.
5. fwgs_library_dependency -- downloads dependency from Web, unpacks it, calls find_library to configure and links to the target. Also does a cache check, if developer have deleted dependency folder for some reason. Just a big shortcut.
6. fwgs_add_compile_options -- like add_compile_options, but with language specification: C for C/C++ flags, CXX for C++ flags, CONLY for C only flags. Also should work with CMake 2.8, which is still used in Ubuntu 12.04, Debian 7 and Steam Runtime toolchain.