-
Notifications
You must be signed in to change notification settings - Fork 0
GettingStarted
ameharoo edited this page Aug 15, 2024
·
1 revision
In your CMakeLists.txt
file, define the following variables:
-
${MESS_DIRECTORY}
: Path to the Mess directory (e.g.,./Mess
). -
${MESS_SOURCE}
: Path to the Mess source file (e.g.,./messages/messages.ini
). -
${MESS_TARGET}
: Path to the output (generated) file (e.g.,./headers/messages.h
).
Add the following lines to your CMakeLists.txt
:
set(MESS_DIRECTORY "${CMAKE_SOURCE_DIR}/Mess")
set(MESS_SOURCE "./messages/messages.ini")
set(MESS_TARGET "./headers/messages.h")
include(${MESS_DIRECTORY}/CMakeLists.txt)
Ensure that CMakeLists.txt
includes dependencies and build your project. For example:
add_executable(cpp_example main.cpp ${MESS_TARGET})
add_dependencies(cpp_example mess)
For a complete example of using Mess with CMake, check out this example.
In your terminal, follow these steps:
cd Mess
# Create and activate a Virtual Environment
python -m venv .venv
source .venv/bin/activate # On Windows use .venv\Scripts\activate.bat or .venv\Scripts\Activate.ps1
# Upgrade pip and install required modules
python -m pip install --upgrade pip
pip install -r requirements
Use the following command to generate code:
python mess.py cpp ./output.cpp ./source.ini
Back to: Home | Getting Started