| 278 |
|
|
| 279 |
BUILDING PCRE ON WINDOWS WITH CMAKE |
BUILDING PCRE ON WINDOWS WITH CMAKE |
| 280 |
|
|
| 281 |
CMake is an alternative build facility that can be used instead of the |
CMake is an alternative configuration facility that can be used instead of the |
| 282 |
traditional Unix "configure". CMake version 2.4.7 supports Borland makefiles, |
traditional Unix "configure". CMake creates project files (make files, solution |
| 283 |
MinGW makefiles, MSYS makefiles, NMake makefiles, UNIX makefiles, Visual Studio |
files, etc.) tailored to numerous development environments, including Visual |
| 284 |
6, Visual Studio 7, Visual Studio 8, and Watcom W8. The following instructions |
Studio, Borland, Msys, MinGW, NMake, and Unix. The following instructions |
| 285 |
were contributed by a PCRE user. |
were contributed by a PCRE user. |
| 286 |
|
|
| 287 |
1. Download CMake 2.4.7 or above from http://www.cmake.org/, install and ensure |
1. Install the latest CMake version available from http://www.cmake.org/, and |
| 288 |
that cmake\bin is on your path. |
ensure that cmake\bin is on your path. |
| 289 |
|
|
| 290 |
2. Unzip (retaining folder structure) the PCRE source tree into a source |
2. Unzip (retaining folder structure) the PCRE source tree into a source |
| 291 |
directory such as C:\pcre. |
directory such as C:\pcre. |
| 292 |
|
|
| 293 |
3. Create a new, empty build directory: C:\pcre\build\ |
3. Create a new, empty build directory, for example C:\pcre\build\ |
| 294 |
|
|
| 295 |
4. Run CMakeSetup from the Shell envirornment of your build tool, e.g., Msys |
4. Run cmake-gui from the Shell envirornment of your build tool, for example, |
| 296 |
for Msys/MinGW or Visual Studio Command Prompt for VC/VC++ |
Msys for Msys/MinGW or Visual Studio Command Prompt for VC/VC++. |
| 297 |
|
|
| 298 |
5. Enter C:\pcre\pcre-xx and C:\pcre\build for the source and build |
5. Enter C:\pcre\pcre-xx and C:\pcre\build for the source and build |
| 299 |
directories, respectively |
directories, respectively. |
| 300 |
|
|
| 301 |
6. Hit the "Configure" button. |
6. Hit the "Configure" button. |
| 302 |
|
|
| 303 |
7. Select the particular IDE / build tool that you are using (Visual Studio, |
7. Select the particular IDE / build tool that you are using (Visual |
| 304 |
MSYS makefiles, MinGW makefiles, etc.) |
Studio, MSYS makefiles, MinGW makefiles, etc.) |
| 305 |
|
|
| 306 |
8. The GUI will then list several configuration options. This is where you can |
8. The GUI will then list several configuration options. This is where |
| 307 |
enable UTF-8 support, etc. |
you can enable UTF-8 support or other PCRE optional features. |
| 308 |
|
|
| 309 |
9. Hit "Configure" again. The adjacent "OK" button should now be active. |
9. Hit "Configure" again. The adjacent "Generate" button should now be |
| 310 |
|
active. |
| 311 |
|
|
| 312 |
10. Hit "OK". |
10. Hit "Generate". |
| 313 |
|
|
| 314 |
11. The build directory should now contain a usable build system, be it a |
11. The build directory should now contain a usable build system, be it a |
| 315 |
solution file for Visual Studio, makefiles for MinGW, etc. |
solution file for Visual Studio, makefiles for MinGW, etc. Exit from |
| 316 |
|
cmake-gui and use the generated build system with your compiler or IDE. |
| 317 |
|
|
| 318 |
|
|
| 319 |
USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS |
USE OF RELATIVE PATHS WITH CMAKE ON WINDOWS |