Skip to content

Latest commit

 

History

2,804 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nomlib

Build Status

C++11 2D game framework using SDL2

Projects Using nomlib

Building

First, ensure that you have the following core dependencies installed:

Next, you should visit the dependencies section for your platform. After these mundane chores are complete, you should be ready to start the building process for your platform!

git clone "https://github.com/i8degrees/nomlib.git" nomlib.git
mkdir build && cd build

Mac OS X

After you have the dependencies taken care of, execute the following commands at your terminal prompt:

# XCode project files can be generated by passing -GXcode
cmake -DDEBUG=on -DDEBUG_ASSERT=on -DEXAMPLES=off -DNOM_BUILD_TESTS=on -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_INSTALL_PREFIX=~/Library/Frameworks ..
make
make test
make install

Upon a successful build, you should have the library modules built as OS X framework bundles, installed wherever CMAKE_INSTALL_PREFIX was set to.

Linux

A Linux build is presently under way and can be tracked via the feature/LinuxPort git branch. Back in development years of nomlib, circa 2014, clang was not a viable build platform (yet!) for Linux. But, now in 2025, the switch over to has aided my porting work. I now have approximately 90% of the porting work completed.

  • 2016
    • My current platform build options for the feature/LinuxPort branch
# 2016
# My current platform build options for the feature/LinuxPort branch
cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DDEBUG=on -DDEBUG_ASSERT=on -DEXAMPLES=off -DNOM_BUILD_TESTS=on -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ..
make
#make test
#make install
  • 2026 Latest platform default build set
# 2026
cmake -S /home/jeff/Projects/nomlib.git -B /tmp/nom-debug \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DDEBUG=on -DDEBUG_ASSERT=on -DEXAMPLES=on -DNOM_BUILD_TESTS=on
#-DGTEST_ROOT= -DGTEST_INCLUDE_DIR= -DGTEST_LIBRARY=
# debug
cmake -S /home/jeff/Projects/nomlib.git -B /tmp/nomlib-debug \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DDEBUG=on -DDEBUG_ASSERT=on -DEXAMPLES=on -DNOM_BUILD_TESTS=on
#-DGTEST_ROOT=/home/jeff/Projects/nomlib.git/third-party/linux/gtest -DGTEST_INCLUDE_DIR=/home/jeff/Projects/nomlib.git/third-party/linux/gtest/include -DGTEST_LIBRARY=/home/jeff/Projects/nomlib.git/third-party/linux/gtest/lib/libgtest.a

# release
cmake -S /home/jeff/Projects/nomlib.git -B /tmp/nomlib-release \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DDEBUG=off -DDEBUG_ASSERT=off -DEXAMPLES=on -DNOM_BUILD_TESTS=on
-DGTEST_ROOT=/home/jeff/Projects/nomlib.git/third-party/linux/gtest -DGTEST_INCLUDE_DIR=/home/jeff/Projects/nomlib.git/third-party/linux/gtest/include -DGTEST_LIBRARY=/home/jeff/Projects/nomlib.git/third-party/linux/gtest/lib/libgtest.a

Until I get around to writing the proper instructions, you may take a look at my .travis.yml build script in the project root of nomlib for hints!

Windows

NOTE: Alpha build quality. This has only been tested on MS Windows 7.

# Download engine dependencies (binaries only)
set NOM_DEPS_URL="http://downloads.sourceforge.net/project/nomlib/windows/2015-03-15_nomlib-ed23aff_windows-dependencies.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fnomlib%2Ffiles%2Fwindows%2F&ts=1448178827&use_mirror=iweb"

wget -O c:\temp\deps.zip %NOM_DEPS_URL%

git clone https://github.com/i8degrees/nomlib.git
cd nomlib

# Install dependency binaries
7z x c:\temp\deps.zip -othird-party

mkdir build && cd build
cmake -G"Visual Studio 12" -DARCH_32=on -DDEBUG=on -DDEBUG_ASSERT=on -DEXAMPLES=off -DNOM_BUILD_TESTS=on ..

Upon a successful generation, you should have populated your current build directory with several Visual Studio project files -- nomlib.vcxproj is the top-level solution.

Project Options

Build options are passed to cmake with the -D option. For example, to change the installation prefix:

cmake -D CMAKE_INSTALL_PREFIX=~/Library/Frameworks ..
  • Installation path: -D CMAKE_INSTALL_PREFIX=<DIRECTORY_PREFIX>

    • Defaults to your current build directory
  • Documentation: -DNOM_BUILD_DOCS=<BOOLEAN>

    • Defaults to OFF
    • When built (ON), the resulting documentation will reside in a new directory named docs
  • Examples: -D EXAMPLES=<BOOLEAN>

    • Defaults to OFF
    • When built (ON), the resulting binaries will reside in a new directory named examples
  • Debugging: -D DEBUG=<BOOLEAN> -D DEBUG_ASSERT=<BOOLEAN>

    • Defaults to OFF
  • Universal binary: -D UNIVERSAL=<BOOLEAN>

    • Defaults to OFF

Removal is provided by executing make uninstall within your current build directory.

IMPORTANT: If you are building multiple target types with the generated MSVCPP or Xcode project files, each of these targets must be kept in separate build directories!

Mac OS X Dependencies

Required OS X version: 10.7

See third-party/README.md for where to obtain pre-packaged libraries and how to install them.

Microsoft Windows Dependencies

Required version: Microsoft Windows Vista

NOTE: This has not been verified.

See third-party/README.md for where to obtain pre-packaged libraries and how to install them.

  1. [Download and install the Microsoft Visual Studio Build Tools 2022][101]. The [direct download link][100].

  2. In the installer that appears, select the Desktop Environment with C++ workload, and under the Installation Details to the right, select C++ Clang Tools for Windows.

  3. Proceed with the install; a restart may be necessary.

  4. From the Start menu, open the Developer PowerShell for VS 2022. This sets up the environment variables for you.

  5. Verify that clang-cl.exe --version is installed.

  • Required software tools in your system PATH
    • MSVSCPP -- <MSVSCPP_INSTALL_PATH>\bin
    • CMake -- <CMAKE_INSTALL_PATH>\bin
    • Git -- <GIT_INSTALL_PATH>\bin
    • vcpkg - [Install & use packages with CMake][102]
      • %VCPKG_ROOT%

If this is your first time installing the tools, you might be happy to know that the official installers can do this task for you automatically.

[100]: https://aka.ms/vs/17/releases/vs_buildtools.exe) [101]: https://learn.microsoft.com/en-us/visualstudio/releases/2022/ [102]: https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-powershell

Releases

Packages

Contributors

Languages