Update CMakeLists.txt

fixed the if-else-endif expression in the CMakeLists, so that it works on Windows & Linux
Merge pull request #1 from jinglehp/patch-1

Update CMakeLists.txt