Skip to content

Commit 1a3e792

Browse files
committed
Update README
1 parent 2eb2a30 commit 1a3e792

File tree

4 files changed

+13
-28
lines changed

4 files changed

+13
-28
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ By virtue of being written in C++, this client works in several different platfo
1616
- Similar API to the Socket.IO JS client
1717

1818
## How to use
19-
### With CMake
19+
<a name="with_cmake"></a>### With CMake
2020
1. Install boost, see [Boost setup](#boost_setup) section.
2121
2. Use `git clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git` to clone your local repo.
2222
3. Run `cmake -DBOOST_PATH:STRING=<your boost install folder> -DBOOST_VER:STRING=<your boost version> ./`
2323
4. Run `make install`(if makefile generated) or open generated project (if project file generated) to build.
24-
5. Find headers and lib under `./build`, link with the static lib and include `sio_client.h` in your client code where you want to use it.
24+
5. Outputs is under `./build`, link with the all static libs under `./build/lib` and include headers under `./build/include` in your client code where you want to use it.
2525

2626
*If you're using boost without install,you can specify `boost include dir` and `boost lib dir` separately by:*
2727
```bash

examples/QT/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Demo shot](https://cldup.com/K2wREmuErz.png)
1+
![Demo shot](https://cldup.com/LNmXuFu2tu.gif)
22

33
In this tutorial we’ll learn how to create a QT chat application that communicates with a [Socket.IO Node.JS chat server](https://github.com/Automattic/socket.io/tree/master/examples/chat).
44

@@ -302,5 +302,6 @@ void MainWindow::SendBtnClicked()
302302
```
303303

304304
###Further reading
305-
If you want to learn more, I recommanded you to look into the [Demo project](https://github.com/socketio/socket.io-client-cpp/tree/master/examples/QT/SioChatDemo) for other features.
305+
You can run [Demo project](https://github.com/socketio/socket.io-client-cpp/tree/master/examples/QT/SioChatDemo) to have a closer look.
306+
Before running, please follow the [instructions](../../README.md#with_cmake) to make the sioclient library.
306307

examples/QT/SioChatDemo/SioChatDemo.pro

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,37 +16,20 @@ CONFIG+=c++11
1616

1717
SOURCES += main.cpp\
1818
mainwindow.cpp \
19-
../../../src/sio_client.cpp \
20-
../../../src/sio_socket.cpp \
21-
../../../src/internal/sio_packet.cpp \
22-
../../../src/internal/sio_client_impl.cpp \
2319
nicknamedialog.cpp
2420

2521
HEADERS += mainwindow.h \
26-
../../../src/sio_client.h \
27-
../../../src/sio_message.h \
28-
../../../src/sio_socket.h \
29-
../../../src/internal/sio_packet.h \
30-
../../../src/internal/sio_client_impl.h \
3122
nicknamedialog.h
3223

3324
FORMS += mainwindow.ui \
3425
nicknamedialog.ui
3526

3627
CONFIG(debug, debug|release):DEFINES +=DEBUG=1
3728

38-
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/release/ -lboost
39-
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/debug/ -lboost
40-
else:unix: LIBS += -L$$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/ -lboost
41-
42-
INCLUDEPATH += $$PWD/../../iOS/SioChatDemo/boost/src/boost_1_55_0
43-
INCLUDEPATH += $$PWD/../../../lib/rapidjson/include
44-
INCLUDEPATH += $$PWD/../../../lib/websocketpp
45-
INCLUDEPATH += $$PWD/../../../src
46-
DEPENDPATH += $$PWD/../../iOS/SioChatDemo/boost/src/boost_1_55_0
47-
48-
win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/release/libboost.a
49-
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/debug/libboost.a
50-
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/release/boost.lib
51-
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/debug/boost.lib
52-
else:unix: PRE_TARGETDEPS += $$PWD/../../iOS/SioChatDemo/boost/osx/build/x86_64/libboost.a
29+
LIBS += -L$$PWD/../../../build/lib/ -lsioclient
30+
LIBS += -L$$PWD/../../../build/lib/ -lboost_system
31+
LIBS += -L$$PWD/../../../build/lib/ -lboost_date_time
32+
LIBS += -L$$PWD/../../../build/lib/ -lboost_random
33+
34+
INCLUDEPATH += $$PWD/../../../build/include
35+
DEPENDPATH += $$PWD/../../../build/lib

0 commit comments

Comments
 (0)