oatpp / oatpp-websocket

oatpp-websocket submodule.
https://oatpp.io/
Apache License 2.0
83 stars 32 forks source link

How to set the installation parameters for oatpp? #15

Closed surfingtomchen closed 5 years ago

surfingtomchen commented 5 years ago

Sorry I am not familiar with cmake. I try to do following steps in windows

mkdir build
cd bulid
cmake ..

but I get following error:

Finding oatpp in location=INSTALLED
CMake Error at CMakeLists.txt:41 (find_package):
  By not providing "Findoatpp.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "oatpp", but
  CMake did not find one.

do I need to revise the cmake file to setup the previous installation dir of oatpp?

lganzzzo commented 5 years ago

Hey @surfingtomchen ,

You need to install the oatpp first. In order for oatpp-websocket to find it.

oatpp:

$ mkdir build
$ cd build/
$ cmake ..
$ make install     # - build and install oatpp

Same for every oatpp module that you are planning to use.

Please let me know if you have more questions.

Regards, Leonid

lganzzzo commented 5 years ago

So in order to build a web app which uses oatpp and oatpp-websocket you have to do:

  1. build and install oatpp

    $ mkdir build
    $ cd build/
    $ cmake ..
    $ make install     # - build and install oatpp
  2. build and install oatpp-websocket

    $ mkdir build
    $ cd build/
    $ cmake ..
    $ make install     # - build and install oatpp-websocket
  3. build your application

    $ mkdir build
    $ cd build/
    $ cmake ..
    $ make      # - generate executable

On windows:

$ MD build                            # - create build folder
$ cd build\                           # - go to build folder
$ cmake ..                            # - generate VS project
$ cmake --build . --target INSTALL    # - install oatpp module

Regards, Leonid

surfingtomchen commented 5 years ago

@lganzzzo really helps. thank you very much.