updated CMake

source files now build properly with linkage