Skip to content

An example project demonstrating how to use libFGL with Conan

Notifications You must be signed in to change notification settings

alaestor/libFGL-Getting-Started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libFGL Getting Started


Example Project

This example assumes that you have the CMake build system, the Conan package manager, and a C++20 compiler (preferably GCC 12.1 or higher as it's officially compatible with libFGL). Also see the libFGL Getting Started documentation.

Note: This example tries to follow best practices where possible by using CMake targets and building "out-of-source". If you're unfamiliar with modern build practices, an examination of the CMakeLists.txt file may be useful.

  1. Set revisions_enabled=1 under the [general] section of your conan.conf file (~/.conan/conan.conf on Linux, and %userprofile%/.conan/conan.conf on Windows).

  2. Add the libFGL conan remote by running

    conan remote add fgl-conan https://fgl.jfrog.io/artifactory/api/conan/fgl-conan
    
  3. git clone or otherwise obtain a local copy of this example project.

  4. Open a terminal and navigate to the root project directory (so that the current working directory is where CMakeLists.txt is located).

  5. Run conan to retrieve the project dependencies (which is only libFGL/latest in this example). With these arguments, we tell it to generate files for cmake and output them to the build/conan subdirectory. This subdirectory is referenced in the CMakeLists.txt file.

    conan install . -if "build/conan" -g "cmake"
    

    Note: If you add other dependencies, you will probably need add the --build=missing option. It isn't required for this example.

  6. Run CMake to generate build files using the CMakeLists.txt in current working directory ".", and output them to the build subdirectory.

    cmake -H"." -B"build"
    

    Note: If you're using MinGW on windows, you will probably need to specify the -G"MinGW Makefiles" generator option.

  7. Run CMake to build the project using the generated files in the build subdirectory.

    cmake --build build
    
  8. Finally, assuming everything went well, we can execute the example program.

    ./build/bin/main.exe
    
conan remote add fgl-conan https://fgl.jfrog.io/artifactory/api/conan/fgl-conan
conan install . -if "build/conan" -g "cmake"
cmake -H"." -B"build"
cmake --build build
./build/bin/main.exe

About

An example project demonstrating how to use libFGL with Conan

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published