fixed CMakeLists.txt with right option parsing