Reputation: 61994
CLion is a powerful multi-platform IDE that allows to run and debug C++ applications.
I tried to use it with an AzerothCore core project.
It is smart enough to detect all the processes:
Mostly I'm interested in running the worldserver
.
However when I try to run or debug it, it correctly compile and runs but it will look for the worldserver.conf.dist
configuration file in the directory /usr/local/etc/
, giving error because that file is not there.
I would like to manually specify the path of such configuration file, as well as passing other CMake parameters.
Upvotes: 1
Views: 596
Reputation: 61994
I made it work by opening File -> Settings and looking for "CMake" under "Build, Execution, Deployment".
From that window I could pass my CMake options, which in my case where:
-G "Unix Makefiles" -DTOOLS=0 -DSCRIPTS=static -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_INSTALL_PREFIX=/path/to/the/main/server/dir
The /path/to/the/main/server/dir
is where my etc
, data
, etc... folders are and the worldserver.config.dist
is inside this etc
folder. So doing this everything worked fine.
I also changed the "Build options" to better use my processor, passing -j 10
.
For macOS users, you'll probably need to add these CMake options as well:
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include
-DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib
-DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include
-DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib
-DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
-DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl/lib/libssl.dylib
-DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl/lib/libcrypto.dylib
Upvotes: 2