Fix wrong if condition at CMakeLists.txt