Skip to content

CMake goodies

Pere Mato Vila requested to merge mato/garfieldpp:cmake-goodies into master

A number of changes in the CMake files to create a state-of-the-art GarfieldConfig.cmake to facilitate the use of the Garfield package by a third party project. An example of CMakeLists.txt is as follows:

cmake_minimum_required(VERSION 3.3 FATAL_ERROR)

find_package(Garfield QUIET)

add_executable(garfield_test1 test1.C)
target_link_libraries(garfield_test1 Garfield)

It takes care automatically of the include directories of Garfield and dependent packages (e.g. ROOT) and dependent libraries, as well as, the compiler features such as the C++ standard used to build Garfield++.

I have also added a README.md file and the Doxygen documentation.

Merge request reports