@@ -101,55 +101,13 @@ cmake .. \
101
101
-DCMAKE_INSTALL_PREFIX=/usr/local
102
102
```
103
103
104
- If installing to a non-standard directory (i.e., one which the dynamic loader does not search),
105
- consider specifying the ` -DCMAKE_INSTALL_RPATH= ` option. This may enable libmongocxx.so to locate
106
- libbsoncxx.so:
107
-
108
- ```
109
- cmake .. \
110
- -DCMAKE_BUILD_TYPE=Release \
111
- -DCMAKE_INSTALL_PREFIX=$HOME/mongo \
112
- -DCMAKE_INSTALL_RPATH=$HOME/mongo/lib
113
- ```
114
-
115
- In the Unix examples that follow, ` mongocxx ` is customized in these ways:
116
-
117
- * ` libmongoc ` is found in ` $HOME/mongo-c-driver ` .
118
- * ` mongocxx ` is to be installed into ` $HOME/mongo-cxx-driver ` .
119
-
120
- With those two distinct (arbitrary) install locations, a user would run this ` cmake ` command:
121
- ``` sh
122
- cmake .. \
123
- -DCMAKE_BUILD_TYPE=Release \
124
- -DCMAKE_PREFIX_PATH=$HOME /mongo-c-driver \
125
- -DCMAKE_INSTALL_PREFIX=$HOME /mongo-cxx-driver
126
- ```
127
-
128
- > * Note* If you need multiple paths in a CMake PATH variable, separate them with a semicolon like
129
- > this:
130
- > ` -DCMAKE_PREFIX_PATH="/your/cdriver/prefix;/some/other/path" `
131
-
132
104
These options can be freely mixed with a C++17 polyfill option. For instance, this is how a user
133
105
would run the command above with the Boost polyfill option:
134
106
``` sh
135
107
cmake .. \
136
108
-DCMAKE_BUILD_TYPE=Release \
137
109
-DBSONCXX_POLY_USE_BOOST=1 \
138
- -DCMAKE_PREFIX_PATH=$HOME /mongo-c-driver \
139
- -DCMAKE_INSTALL_PREFIX=$HOME /mongo-cxx-driver
140
- ```
141
-
142
- #### Configuring with ` mongocxx ` 3.1.x or 3.0.x
143
-
144
- Instead of the ` -DCMAKE_PREFIX_PATH ` option, users must specify the ` libmongoc ` installation
145
- directory by using the ` -DLIBMONGOC_DIR ` and ` -DLIBBSON_DIR ` options:
146
-
147
- ``` sh
148
- cmake .. \
149
- -DCMAKE_BUILD_TYPE=Release \
150
- -DLIBMONGOC_DIR=$HOME /mongo-c-driver \
151
- -DLIBBSON_DIR=$HOME /mongo-c-driver \
152
- -DCMAKE_INSTALL_PREFIX=$HOME /mongo-cxx-driver
110
+ -DCMAKE_INSTALL_PREFIX=/usr/local
153
111
```
154
112
155
113
### Step 5: Build and install the driver
@@ -182,6 +140,6 @@ sudo cmake --build . --target uninstall
182
140
Second, the uninstall script can be called:
183
141
184
142
``` sh
185
- sudo $HOME /mongo-cxx-driver /share/mongo-cxx-driver/uninstall.sh
143
+ sudo /usr/local /share/mongo-cxx-driver/uninstall.sh
186
144
```
187
145
0 commit comments