Some formatting and more information
This commit is contained in:
parent
6f401f54c7
commit
23f0840f2b
20
README.md
20
README.md
@ -1,8 +1,11 @@
|
||||
# SWIG CMake PHP Example for Windows
|
||||
Example on how to build a SWIG Extension for PHP with CMake on Windows.
|
||||
Couldn't find any working example for Windows so i created this one ;)
|
||||
Hope it helps you.
|
||||
|
||||
Couldn't find any working example even without CMake for Windows so i created this one ;)
|
||||
Hope it helps others.
|
||||
|
||||
You need Visual Studio installed.
|
||||
For current Version of PHP, you need current Version of VS2017 (Community Edition is okay)
|
||||
To build this Example, build PHP as descriped here: https://github.com/Microsoft/php-sdk-binary-tools
|
||||
|
||||
You need SWIG to make this work.
|
||||
@ -15,11 +18,14 @@ I have a fork of swig in my github account which enables you to build it with cm
|
||||
|
||||
Build it and change the path SWIG_EXECUTABLE and SWIG_DIR to your environment.
|
||||
|
||||
You can stay inside PHP-SDK-Shell if you want, change directory back to where you checked out this and then execute the following commands.
|
||||
You can stay inside PHP-SDK-Shell if you want or open a new x64/x86 Native Tools Command Prompt for VS 2017.
|
||||
Change directory back to where you checked out this and then execute the following commands.
|
||||
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Wno-dev -DSWIG_EXECUTABLE=C:\dev\work\swig\swig.exe -DSWIG_DIR=C:\dev\work\swig
|
||||
- cmake --build .
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -Wno-dev -DSWIG_EXECUTABLE=C:\dev\work\swig\swig.exe -DSWIG_DIR=C:\dev\work\swig
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
Thats it.
|
||||
|
Loading…
Reference in New Issue
Block a user