This is my C++ playsground. I'm mostly using CLion as IDE but also Helix. Most of the projects can be built by going to the build folder and executing:
cmake ..
make
There will be some projects for Drogon Web server.
Here is my install guide for Mac M1 running on Arm native processor (Homebrew).
- It requires Xcode installed
- Install Drogon dependencies: brew upgrade ; brew install jsoncpp ossp-uuid zlib-devel openssl
- Install Drogon database dependencies (PostgreSQL and Redis): brew install postgresql@14 hiredis
- Add variables to support the build process. In my case they were added to
~/.zshrc
:
export OPENSSL_CRYPTO_LIBRARY="/opt/homebrew/opt/openssl"
export OPENSSL_INCLUDE_DIR="/opt/homebrew/opt/openssl/include"
export OPENSSL_ROOT_DIR="/opt/homebrew/opt/openssl"
export OPENSSL_LIBRARIES="/opt/homebrew/opt/openssl/lib"
- Install Drogon as recommended on the official documentation (at 2023-06-05), but for the CMAKE we are providing the paths explicitly. Please, review and adjust baed on your OpenSSL path. For the installation it will request the root password:
cd $WORK_PATH
git clone https://github.com/drogonframework/drogon
cd drogon
git submodule update --init
mkdir build
cd build
cmake -DOPENSSL_ROOT_DIR=$OPENSSL_ROOT_DIR -DOPENSSL_LIBRARIES=$OPENSSL_LIBRARIES ..
make && sudo make install
- At this point the
drogon_ctl
ordg_ctl
should be available on the shell. It's installed on/usr/local/bin
. If you can find, you might need to add the directory to yourPATH
env variable.