Use Cmake dependency chain
Add PLATFORM_SPECIFIC_LIBRARIES to link platform specific libraries
Tidy CMakeLists.txt
merge duplicated condition check