CXXGraph icon indicating copy to clipboard operation
CXXGraph copied to clipboard

Add CPM which is based on CMake's Fetch_Content module in the project

Open ZigRazor opened this issue 1 year ago • 1 comments

Please add the possibility to use CPM to add the CXXGraph library to a project makefile with CPMAddPackage function

ZigRazor avatar Apr 30 '24 07:04 ZigRazor

  1. CXXGraph already supports CPM, somewhat, but it's not great:
CPMAddPackage("gh:ZigRazor/CXXGraph")
if (CXXGraph_ADDED)
    add_library(CXXGraph INTERFACE IMPORTED GLOBAL)
    target_include_directories(CXXGraph INTERFACE "${CXXGraph_SOURCE_DIR}/include")
endif()

In this instance, we will want to provide a library target for CPM users so that they don't need it create it themselves.

  1. CXXGraph doesn't support single-header inclusion yet: we need to add functionality that builds the single-header from all our headers.

nolankramer avatar Apr 30 '24 18:04 nolankramer