Giter VIP home page Giter VIP logo

cmakepublic's Introduction

CMakePublic

A repository containing a very simple C++ library. The main purposes of this repo are:

  • showcase what a well-written, modern CMake build system looks like
  • have a public GitHub-based, C++ library with a CMake build system for unit testing CMaize
  • the resulting library creates a function call_cmake_public which always returns 3 (i.e., it's not very useful for actual C++ purposes...)

Installing CMakePublic

CMakePublic is installed via the usual CMake workflow:

# Obtain the source code (skip if you've already done this)
git clone https://github.com/CMaizeExamples/CMakePublic.git
cd CMakePublic

# Configure
cmake -H. -B<build_dir> -DCMAKE_INSTALL_PREFIX=<where/to/install>

# Build
cmake --build <build_dir>

# Install
cmake --build <build_dir> -- target install

where:

  • <build_dir> is the name of a directory where the build files will be stored.
  • <where/to/install> is the name of the directory where the finished library should be installed to.
    • If you do not specify this CMake will default to the operating system specific path for user-wide software.
      • You really do not want this library installed user-wide...

After installing <where/to/install> should minimally contain:

  • The actual library lib/cmakepublic/libCMakePublic.a
    • The extension and name will vary from operating system to operating system
  • The header file include/cmakepublic/cmake_public.hpp
  • The CMake packaging files:
    • lib/cmakepublic/cmake/CMakePublicConfig.cmake

Additional files (such a build type specific config file) may also be present depending on the exact configuration command you (or your IDE) use.

cmakepublic's People

Contributors

ally3999 avatar ryanmrichard avatar zachcran avatar blakemulnix avatar theodoredavis avatar

Watchers

James Cloos avatar  avatar  avatar

cmakepublic's Issues

Add project name in install destinations

As of right now running make install installs the files to for example /usr/lib/libcmakepublic.a when it should install to /usr/lib/cmakepublic/libcmakepublic.a

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.