Giter Club home page Giter Club logo

simple-cmake-package's Introduction

CMake project quick-starter ๐Ÿ˜Ž

1. Installation of this package

git clone https://github.com/icsl-Jeon/simple-cmake-package.git
cd simple-cmake-package
mkdir build && cd build && cmake ..
make 
sudo make install

2. Using this package from other package (say, client_package)

CMakeLists.txt of client_package

cmake_minimum_required(VERSION 3.15.0)
project(client_project)

find_package(SimplePackage REQUIRED)

add_executable(client_project_executable main.cpp)
target_link_libraries(client_project_executable simple_package)

Your main.cpp be like this

#include <first_class/FirstClass.hpp>
#include <second_class/SecondClass.hpp>

#include <iostream>
int main(int, char **) {
  SecondClass second_class(7);

  std::cout << "Hello, world! " << second_class.GetDecreasedVariable()
            << std::endl;
}

simple-cmake-package's People

Contributors

icsl-jeon avatar

Watchers

 avatar

simple-cmake-package's Issues

Regarding employing other package.

If one wishes to use an external package and build it alongside the current package, what codes should be added in CMakeLists.txt? For instance, if one desires to utilize the PCL library.

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.