Updated CMakeLists.txt to improve usage as a subdirectory.

This will let the library to be used in other CMake projects as a subdirectory.