CopperSpice Overview
Building on MSVC

This following steps show how to build CopperSpice and KitchenSink from source using MSVC. We are providing two different methods for building which are slightly different, however both approaches will produce the same binary DLL files.

For information about installing and getting started with MSVC refer to Building for Windows (MSVC). This page provides directions for building CopperSpice which are almost identical to Method 1 shown below. It also includes steps to build from a source distribution rather than a GitHub checkout, as well as information about how to select a CopperSpice build in Debug or Release mode.

Building CopperSpice - Method 1

  • Start Visual Studio
  • From the View menu choose Team Explorer
  • Under Local Git Repositories, choose the Clone option
  • Paste the following github URL in the first field
  • The second field is where the local directory for the git repository is entered, our suggestion is to name the folder your path\cs
  • Click the Clone button
  • After the repository has been cloned, select File, Open, CMake
  • Choose the CMakeLists.txt file from the repository which was just cloned
  • To modify where the CopperSpice build files will be located, from the View menu choose Solution Explorer
    From the CMake menu choose Change CMake Settings, then CopperSpice
    In the JSON file which is now displayed modify the buildRoot and installRoot parameters
  • From the main CMake menu select Build All to build CopperSpice
  • From the main CMake menu select Install, then CopperSpice to install

Building CopperSpice - Method 2

  • Clone the CopperSpice Github repository or download the source from our Downloads, refer to Downloading Source

    Our suggestion is to clone or copy to a folder named your path\cs

  • Open an "x64 Native Tools Command Prompt for VS2019"

    This approach ensures the environment is setup correctly for CMake. It will configure CopperSpice for the current version of Visual Studio and for the x64 target.

  • Change to your path\cs directory and create a new sub-directory called build_x64
  • Change to your path\cs\build_x64 directory
  • Run the following command from the VS command prompt to generate the build system for ninja

    cmake -G Ninja ..
  • Run the following command from the VS command prompt to build CopperSpice

  • Run the following command from the VS command prompt to install CopperSpice

    ninja install

Building KitchenSink

Select one the two methods listed above for building CopperSpice and use the same steps to build the KitchenSink demo application.