-
Notifications
You must be signed in to change notification settings - Fork 29
Description
By @AlexandreHURDYK:
Ok I managed to compile that submodule on windows through trial and error. Here's my procedure :
As a prerequisite, you'll need the following things :
The OpenSSL header files, along with the libcrypto.lib and libssl.lib libraries.
A compiled installation of oatpp on "C:\Program Files (x86)\oatpp".
-
Create a directory where you want which will contain your stuff.
-
Launch the Windows console in administrator mode, go inside your directory.
-
$ git clone https://github.com/oatpp/oatpp-openssl.git -
Create a directory somewhere else to put your OpenSSL files. I'd avoid putting these in the cloned repository however.
-
Inside your new directory, do the following :
- Put
libcrypto.libandlibssl.libinside of that directory. - Create a new directory called "openssl" : this is very important, the name HAS to be
opensslbecause the cmake seeks for headers inside a directory called "openssl". Otherwise, you will trigger a compilation error about defining the OPENSSL_ROOT_DIR variable, which is actually a dud. - Put all your include files in this new "openssl" directory.
- Put
-
Do the following console commands :
$ cd oatpp-openssl $ MD build $ cd build
-
Do this command :
cmake .. -DOPENSSL_ROOT_DIR={path to openssl libs} -DOPENSSL_INCLUDE_DIR={paths to openssl libs}
The -DOPENSSL variables are the parts you want to pay attention to. Creating a new environment variable actually somehow doesn't work on windows. You need to add and fill these two variables in your cmake command to valid it.
Both have the path to your openssl libs : that's not a typo. Your includes directory should be located in the same directory as your libraries, under the name "openssl" so the cmake script will actually find them.
- Execute the following command:
-
For a debug build:
$ cmake --build . --target INSTALL -
For a release build:
$ cmake --build . --target INSTALL --config Release ```
-