added options to CMakeLists.txt for using as submodule and to fix FPIC
Fixed typo in CMakeLists.txt