-
Notifications
You must be signed in to change notification settings - Fork 27
Building
This page shows how to compile the mod.io SDK shared library. If you are a Game Developer seeking to add mod.io functionality to your project please refer to the Getting Started guide instead.
Mod.io SDK is built on the top of Zlib, LibCurl and JSON for Modern C++. VisualC++, MinGW, GCC and Clang are supported. In order to build it use CMake combined with your compiler of choice.
In order to compile using the Visual C++ Redistributable. The nmake
command is available on the Visual C++ command line interface provided by the Redistributable or you can add it to your environment path.
We ship the Zlib and Curl binaries under the lib/MSVC
directory but feel free to build them yourself by following our guide.
cd src
mkdir build
cd build
cmake -G"Nmake Makefiles" ..
nmake
This will generate the import library modio.lib
and the dynamic library modio.dll
.
Download and install the MinGW with MinGW32-Make support. Then add the MinGW bin/
directory to your environment path.
We ship the Zlib and Curl binaries under the lib/MinGW
directory but feel free to build them yourself by following our guide.
cd src
mkdir build
cd build
cmake -G"MinGW Makefiles" ..
mingw32-make
This will generate the import library libmodio.a
and the dynamic library libmodio.dll
.
Install the following dependencies:
#Debian, Ubuntu
apt install cmake g++ zlib1g-dev libcurl4-gnutls-dev
#Fedora
dnf install cmake gcc-c++ libcurl-devel zlib-devel
mkdir build
cd build
cmake ..
make
This will generate the shared library libmodio.so
library.
Install the build essentials shipped with XCode.
mkdir build
cd build
cmake ..
make
This will generate the shared library libmodio.dylib
library.
This article refers to building mod.io as a static library. If instead you want to link a precompiled static library please refer to the Getting Started Guide.
The CMake setup will build the SDK dynamically by default. To build it statically you have to set the mode
cache variable to static
. For example:
cmake -D mode=static ..
This will generate the modio.lib
or libmodio.a
static library depending on your target.
- Home
- Table of Contents
- Getting Started
- SDK Methods
- Creators
- Editors
- Schemas
- modio::Avatar
- modio::Comment
- modio::Dependency
- modio::Download
- modio::Error
- modio::Filehash
- modio::Game
- modio::GameTagOption
- modio::Header
- modio::Icon
- modio::Image
- modio::InstalledMod
- modio::Logo
- modio::Media
- modio::MetadataKVP
- modio::Mod
- modio::ModEvent
- modio::Modfile
- modio::QueuedModDownload
- modio::QueuedModfileUpload
- modio::Rating
- modio::Response
- modio::Stats
- modio::Tag
- modio::User
- Debugging
- Constants
-
C Compatibility
- Methods
- Initialization, Process and Shutdown (C compatible)
- User Authentication (C compatible)
- Mods (C compatible)
- Modfiles (C compatible)
- Media (C compatible)
- Subscriptions (C compatible)
- Events (C compatible)
- Stats (C compatible)
- Tags (C compatible)
- Ratings (C compatible)
- Metadata KVP (C compatible)
- Dependencies (C compatible)
- Comments (C compatible)
- Reports (C compatible)
- Me (C compatible)
- Downloads (C compatible)
- Uploads (C compatible)
- Logs (C compatible)
- External Auth (C compatible)
- Configuration (C compatible)
- Creators
- Editors
- Schemas
- ModioAvatar
- ModioComment
- ModioDependency
- ModioDownload
- ModioError
- ModioFilehash
- ModioGame
- ModioGameTagOption
- ModioHeader
- ModioIcon
- ModioImage
- ModioInstalledMod
- ModioListNode
- ModioLogo
- ModioMedia
- ModioMetadataKVP
- ModioMod
- ModioModEvent
- ModioModfile
- ModioQueuedModDownload
- ModioQueuedModfileUpload
- ModioRating
- ModioResponse
- ModioStats
- ModioTag
- ModioUser
- Methods
- Building