Q:

Setting the implementation of an abstract class based on settings in config file using smart pointers

I want to choose the implementation of an abstract class based on settings from a config file.  Is this the proper way of doing that? 
I am asking because I am having doubts about using std::make_unique inside  the if scope.  Will the object created with std::make_unique still be valid outside of the if scope?   
#include <iostream>
#include <memory>

// Base class for all position systems
class PositionSystem {
public:
    virtual int getX() const = 0;
};

// GPS implementation
class GPS: public PositionSystem {
public:
    int getX() const {return 42;};
};

// Galileo implementation
class Galileo: public PositionSystem {
public:
    int getX() const {return 21;};
};

int main(){
    // Settings are read from config file
    // and stored in a smiliar struct
    struct {std::string position_system = "Galileo";} settings;

    // Declare position system    
    std::unique_ptr<PositionSystem> ps;

    // Choose implementation based on settings
    if(settings.position_system == "GPS"){
        ps = std::make_unique<GPS>(GPS());
    }
    else if (settings.position_system == "Galileo"){
        ps = std::make_unique<Galileo>(Galileo());
    }

    // Use interface
    std::cout << ps->getX() << '\n';

    return 0;
}

A:

When you have a derived type deleted via a pointer to the base class you need to define a virtual destructor.  This also applies when you are using unique_ptr. 
// Base class for all position systems
class PositionSystem {
public:
    virtual ~PositionSystem() {}    // You need this or your object will 
                                    // not be correctly destroyed. 
    virtual int getX() const = 0;
};

You don't need to create an objet and copy it. 
    ps = std::make_unique<GPS>(GPS());
                           //  ^^^^^    This creates a automatic object
                           //           When make_unique calls new
                           //           this automatic object is copy constructed
                           //           into the dynamic object. 

Simply do this:
    ps = std::make_unique<GPS>();

You have the correct answer.  Its an if/switch/command patter that you use to create the correct object.  But you don't need to use a unique pointer.  You could use a reference rather than a unique_ptr (but a unique_ptr is simpler). 
But rather than do it in main I would move this work into a factory specifically for this job. 
std::unique_ptr<PositionSystem> ps = positionSystemFactory(settings);

Then you just need to write the factory method:
std::unique_ptr<PositionSystem> positionSystemFactory(Settings const& settings)
{
    // Choose implementation based on settings
    if(settings.position_system == "GPS"){
        return std::make_unique<GPS>();
    }
    else if (settings.position_system == "Galileo"){
        return std::make_unique<Galileo>();
    }
    throw Failure;
}

am having doubts about using std::make_unique inside the if scope.  

Yes it will work as expected. 
else if (settings.position_system == "Galileo"){
        ps = std::make_unique<Galileo>(Galileo());
    }

Even though the temp object created by make_unique() will be destroyed when it goes out of scope; this object is assigned to the variable ps where its content is maintained. 
How this works: The temp object invokes the templatized move constructor on ps thus resulting in the contained pointer being moved from the temp object into ps (which takes ownership away from the temp object).  When the temp object is destroyed it no longer owns the pointer and thus does not delete it.