Code Monkey home page Code Monkey logo

ntv2's Introduction

AJA NTV2 SDK (MIT license)

Building the ajantv2 library with CMake and ninja build on Windows/macOS/Linux

  1. Download and install CMake 3.10 or higher and place it in your PATH on the filesystem. CMake is available on all three major platforms supported by ajantv2 (Windows, macOS, Linux).

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    

    Then, run: brew install cmake

    • Ubuntu Linux 20.04 - Install CMake via the apt package manager:
    sudo apt update
    sudo apt install cmake
    
  2. Download ninja build, unzip and place it somewhere within the PATH on your filesystem.

  3. Clone the ntv2 git repository.

    git clone [email protected]:aja-video/ntv2.git
    
  4. cd into the ntv2 git repo directory.

  5. Create a temporary build directory where CMake will produce the build artifacts. For example: mkdir cmake-build

  6. cd into the new build directory: cd cmake-build

  7. Windows/MSVC-only: Run the vcvarsall.bat script within the VS2017 or 2019 installation to initialize the MSVC environment for x86 64-bit.

    "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
    
  8. Run cmake to generate the input files for build system to consume.

    CMake is a "meta-build" tool and as such it does not build the ajantv2 library itself. Rather, it generates input files that another build system consumes to build ajantv2. This tutorial uses the aformentioned "ninja build" system but other CMake build system "generators" are available on Windows, macOS and Linux. See https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html for more information about CMake generators.

    • Generating build files for the ajantv2 library:
    cmake -DCMAKE_BUILD_TYPE=Debug -GNinja ..    
    

    NOTE: Specify -DCMAKE_BUILD_TYPE=Release to build the ajantv2 library in release mode with optimizations.

  9. Run ninja to build the ntv2 software:

    ninja -f build.ninja
    

Binaries of the ajantv2 library can be found within your temporary build directory, under ajalibraries/ajantv2.

Part 2: Building with CMake + Visual Studio Solution files

These instructions assume that you have:

  • Installed CMake 3.10 or higher.
  • Installed either Visual Studio 2017 or 2019 and any Visual C++ dependencies required to build ntv2.
  • Checked out the ntv2 git repository.
  1. Create temporary build directory:
    mkdir cmake-build
    
  2. cd into the temporary build directory.
  3. Run CMake to generate a Visual Studio Solution:
    • VS 2017 (x64)
    cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 15 2017 Win64" ..
    
    • VS 2019 (x64)
    cmake -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 16 2019" -A Win64 ..
    
  4. Build the generated VS solution with MSBuild:
    msbuild /p:Platform=x64 /p:Configuration=Debug /t:Clean,Build ntv2.sln
    
    NOTE: The solution (ntv2.sln) file may also be opened in Visual Studio for building.

Part 3: Building with CMake + Unix Makefiles on macOS or Linux

These instructions assume that you have:

  • Installed CMake 3.10 or higher.
  • Installed GCC or Clang on your macOS/Linux system.
  • Checked out the ntv2 git repository.
  1. Create temporary build directory:
    mkdir cmake-build
    
  2. cd into the temporary build directory.
  3. Run CMake to generate Makefiles for ntv2:
    cmake -DCMAKE_BUILD_TYPE=Debug -G Makefile ..
    
  4. Build the generated Makefiles:
    make -j$(nproc)
    

ntv2's People

Contributors

ddrboxman avatar handledexception avatar paulh-aja avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.