<div dir="auto"><span style="font-family:sans-serif;font-size:12.8px">Hello, fellow CMake users!</span><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">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. </div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">At this time it have some macros specific for my project, but I hope others can find it useful too.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">List of macros:</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">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.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">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.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">3. fwgs_set_default_properties -- default properties for target. For me it enables PIC and removes "lib" prefix on Windows.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">4. fwgs_string_option -- option() but for strings.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">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.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">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.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">There is other too, but I plan to rework them.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><a href="https://github.com/FWGS/xash3d/blob/master/cmake/FWGSLib.cmake" style="text-decoration-line:none;color:rgb(66,133,244)">https://github.com/FWGS/<wbr>xash3d/blob/master/cmake/<wbr>FWGSLib.cmake</a></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">I accept any criticism. I understand that many of them maybe aren't needed, I just doesn't found any equivalent in documentation.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Thanks for attention!</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Alibek Omarov a.k.a a1batross</div></div>