Fix order in CMakeLists. We need to search libraries before externals are included