📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.

Overview

Actions Status Actions Status Actions Status



Setup-free CMake dependency management

CPM.cmake is a CMake script that adds dependency management capabilities to CMake. It's built as a thin wrapper around CMake's FetchContent module that adds version control, caching, a simple API and more.

Manage everything

Any downloadable project or resource can be added as a version-controlled dependency though CPM, it is not necessary to modify or package anything. Projects using modern CMake are automatically configured and their targets can be used immediately. For everything else, the targets can be created manually after the dependency has been downloaded (see the snippets below for examples).

Further reading

Usage

After CPM.cmake has been added to your project, the function CPMAddPackage can be used to fetch and configure a dependency. Afterwards, any targets defined in the dependency can be used directly. CPMAddPackage takes the following named parameters.

CPMAddPackage(
  NAME          # The unique name of the dependency (should be the exported target's name)
  VERSION       # The minimum version of the dependency (optional, defaults to 0)
  OPTIONS       # Configuration options passed to the dependency (optional)
  DOWNLOAD_ONLY # If set, the project is downloaded, but not configured (optional)
  [...]         # Origin parameters forwarded to FetchContent_Declare, see below
)

The origin may be specified by a GIT_REPOSITORY, but other sources, such as direct URLs, are also supported. If GIT_TAG hasn't been explicitly specified it defaults to v(VERSION), a common convention for git projects. On the other hand, if VERSION hasn't been explicitly specified, CPM can automatically identify the version from the git tag in some common cases. GIT_TAG can also be set to a specific commit or a branch name such as master, however this isn't recommended, as such packages will only be updated when the cache is cleared.

If an additional optional parameter EXCLUDE_FROM_ALL is set to a truthy value, then any targets defined inside the dependency won't be built by default. See the CMake docs for details.

A single-argument compact syntax is also supported:

# A git package from a given uri with a version
CPMAddPackage("[email protected]")
# A git package from a given uri with a git tag or commit hash
CPMAddPackage("uri#tag")
# A git package with both version and tag provided
CPMAddPackage("[email protected]#tag")

In the shorthand syntax if the URI is of the form gh:user/name, it is interpreted as GitHub URI and converted to https://github.com/user/name.git. If the URI is of the form gl:user/name, it is interpreted as a GitLab URI and converted to https://gitlab.com/user/name.git. If the URI is of the form bb:user/name, it is interpreted as a Bitbucket URI and converted to https://bitbucket.org/user/name.git. Otherwise the URI used verbatim as a git URL. All packages added using the shorthand syntax will be added using the EXCLUDE_FROM_ALL flag.

The single-argument syntax also works for URLs:

# An archive package from a given url. The version is inferred
CPMAddPackage("https://example.com/my-package-1.2.3.zip")
# An archive package from a given url with an MD5 hash provided
CPMAddPackage("https://example.com/my-package-1.2.3.zip#MD5=68e20f674a48be38d60e129f600faf7d")
# An archive package from a given url. The version is explicitly given
CPMAddPackage("https://example.com/[email protected]")

After calling CPMAddPackage, the following variables are defined in the local scope, where is the name of the dependency.

  • _SOURCE_DIR is the path to the source of the dependency.
  • _BINARY_DIR is the path to the build directory of the dependency.
  • _ADDED is set to YES if the dependency has not been added before, otherwise it is set to NO.

For using CPM.cmake projects with external package managers, such as conan or vcpkg, setting the variable CPM_USE_LOCAL_PACKAGES will make CPM.cmake try to add a package through find_package first, and add it from source if it doesn't succeed.

In rare cases, this behaviour may be desirable by default. The function CPMFindPackage will try to find a local dependency via CMake's find_package and fallback to CPMAddPackage, if the dependency is not found.

Full CMakeLists Example

cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

# create project
project(MyProject)

# add executable
add_executable(tests tests.cpp)

# add dependencies
include(cmake/CPM.cmake)
CPMAddPackage("gh:catchorg/[email protected]")

# link dependencies
target_link_libraries(tests Catch2)

See the examples directory for complete examples with source code and check below or in the wiki for example snippets.

Adding CPM

To add CPM to your current project, simply add the latest release of CPM.cmake or get_cpm.cmake to your project's cmake directory. The command below will perform this automatically.

mkdir -p cmake
wget -O cmake/CPM.cmake https://github.com/cpm-cmake/CPM.cmake/releases/latest/download/get_cpm.cmake

You can also download CPM.cmake directly from your project's CMakeLists.txt. See the wiki for more details.

Updating CPM

To update CPM to the newest version, update the script in the project's root directory, for example by running the command above. Dependencies using CPM will automatically use the updated script of the outermost project.

Advantages

  • Small and reusable projects CPM takes care of all project dependencies, allowing developers to focus on creating small, well-tested libraries.
  • Cross-Platform CPM adds projects directly at the configure stage and is compatible with all CMake toolchains and generators.
  • Reproducible builds By versioning dependencies via git commits or tags it is ensured that a project will always be buildable.
  • Recursive dependencies Ensures that no dependency is added twice and all are added in the minimum required version.
  • Plug-and-play No need to install anything. Just add the script to your project and you're good to go.
  • No packaging required Simply add all external sources as a dependency.
  • Simple source distribution CPM makes including projects with source files and dependencies easy, reducing the need for monolithic header files or git submodules.

Limitations

  • No pre-built binaries For every new build directory, all dependencies are initially downloaded and built from scratch. To avoid extra downloads it is recommend to set the CPM_SOURCE_CACHE environmental variable. Using a caching compiler such as ccache can drastically reduce build time.
  • Dependent on good CMakeLists Many libraries do not have CMakeLists that work well for subprojects. Luckily this is slowly changing, however, until then, some manual configuration may be required (see the snippets below for examples). For best practices on preparing projects for CPM, see the wiki.
  • First version used In diamond-shaped dependency graphs (e.g. A depends on C@1.1 and B, which itself depends on C@1.2 the first added dependency will be used (in this case C@1.1). In this case, B requires a newer version of C than A, so CPM will emit a warning. This can be easily resolved by adding a new version of the dependency in the outermost project, or by introducing a package lock file.

For projects with more complex needs and where an extra setup step doesn't matter, it may be worth to check out an external C++ package manager such as vcpkg, conan or hunter. Dependencies added with CPMFindPackage should work with external package managers. Additionally, the option CPM_USE_LOCAL_PACKAGES will enable find_package for all CPM dependencies.

Comparison to FindPackage

The usual way to add libraries in CMake projects is to call find_package( ) and to link against libraries defined in a _LIBRARIES variable. While simple, this may lead to unpredictable builds, as it requires the library to be installed on the system and it is unclear which version of the library has been added. Additionally, it is difficult to cross-compile projects (e.g. for mobile), as the dependencies will need to be rebuilt manually for each targeted architecture.

CPM.cmake allows dependencies to be unambiguously defined and builds them from source. Note that the behaviour differs from find_package, as variables exported to the parent scope (such as _LIBRARIES ) will not be visible after adding a package using CPM.cmake. The behaviour can be achieved manually, if required.

Comparison to pure FetchContent / ExternalProject

CPM.cmake is a wrapper for CMake's FetchContent module and adds a number of features that turn it into a useful dependency manager. The most notable features are:

  • A simpler to use API
  • Version checking: CPM.cmake will check the version number of any added dependency and emit a warning if another dependency requires a more recent version.
  • Offline builds: CPM.cmake will override CMake's download and update commands, which allows new builds to be configured while offline if all dependencies are available locally.
  • Automatic shallow clone: if a version tag (e.g. v2.2.0) is provided and CPM_SOURCE_CACHE is used, CPM.cmake will perform a shallow clone of the dependency, which should be significantly faster while using less storage than a full clone.
  • Overridable: all CPMAddPackage can be configured to use find_package by setting a CMake flag, making it easy to integrate into projects that may require local versioning through the system's package manager.
  • Package lock files for easier transitive dependency management.
  • Dependencies can be overridden per-build using CMake CLI parameters.

ExternalProject works similarly as FetchContent, however waits with adding dependencies until build time. This has a quite a few disadvantages, especially as it makes using custom toolchains / cross-compiling very difficult and can lead to problems with nested dependencies.

Options

CPM_SOURCE_CACHE

To avoid re-downloading dependencies, CPM has an option CPM_SOURCE_CACHE that can be passed to CMake as -DCPM_SOURCE_CACHE= . This will also allow projects to be configured offline, as long as the dependencies have been added to the cache before. It may also be defined system-wide as an environmental variable, e.g. by exporting CPM_SOURCE_CACHE in your .bashrc or .bash_profile.

export CPM_SOURCE_CACHE=$HOME/.cache/CPM

Note that passing the variable as a configure option to CMake will always override the value set by the environmental variable.

You can use CPM_SOURCE_CACHE on GitHub Actions workflows cache and combine it with ccache, to make your CI faster. See the wiki for more info.

CPM_DOWNLOAD_ALL

If set, CPM will forward all calls to CPMFindPackage as CPMAddPackage. This is useful to create reproducible builds or to determine if the source parameters have all been set correctly. This can also be set as an environmental variable.

CPM_USE_LOCAL_PACKAGES

CPM can be configured to use find_package to search for locally installed dependencies first by setting the CMake option CPM_USE_LOCAL_PACKAGES. If the option CPM_LOCAL_PACKAGES_ONLY is set, CPM will emit an error if the dependency is not found locally. These options can also be set as environmental variables.

In the case that find_package requires additional arguments, the parameter FIND_PACKAGE_ARGUMENTS may be specified in the CPMAddPackage call. The value of this parameter will be forwarded to find_package.

CPM_USE_NAMED_CACHE_DIRECTORIES

If set, CPM use additional directory level in cache to improve readability of packages names in IDEs like CLion. It changes cache structure, so all dependencies are downloaded again. There is no problem to mix both structures in one cache directory but then there may be 2 copies of some dependencies. This can also be set as an environmental variable.

Local package override

Library developers are often in the situation where they work on a locally checked out dependency at the same time as on a consumer project. It is possible to override the consumer's dependency with the version by supplying the CMake option CPM_ _SOURCE set to the absolute path of the local library. For example, to use the local version of the dependency Dep at the path /path/to/dep, the consumer can be built with the following command.

cmake -Bbuild -DCPM_Dep_SOURCE=/path/to/dep

Package lock

In large projects with many transitive dependencies, it can be useful to introduce a package lock file. This will list all CPM.cmake dependencies and can be used to update dependencies without modifying the original CMakeLists.txt. To use a package lock, add the following line directly after including CPM.cmake.

CPMUsePackageLock(package-lock.cmake)

To create or update the package lock file, build the cpm-update-package-lock target.

cmake -Bbuild
cmake --build build --target cpm-update-package-lock

See the wiki for more info.

Built with CPM.cmake

Some amazing projects that are built using the CPM.cmake package manager. If you know others, feel free to add them here through a PR.

otto-project

OTTO - The Open Source GrooveBox

maphi

Maphi - the Math App

modern-cpp-starter

ModernCppStarter

Snippets

These examples demonstrate how to include some well-known projects with CPM. See the wiki for more snippets.

Catch2

CPMAddPackage("gh:catchorg/[email protected]")

Range-v3

CPMAddPackage("gh:ericniebler/range-v3#0.11.0")

Yaml-cpp

# as the tag is in an unusual format, we need to explicitly specify the version
CPMAddPackage("gh:jbeder/yaml-cpp#[email protected]")

nlohmann/json

CPMAddPackage(
  NAME nlohmann_json
  VERSION 3.9.1
  OPTIONS 
    "JSON_BuildTests OFF"
)

Boost

# boost is a huge project and will take a while to download
# using `CPM_SOURCE_CACHE` is strongly recommended
CPMAddPackage(
  NAME Boost
  VERSION 1.77.0
  GITHUB_REPOSITORY "boostorg/boost"
  GIT_TAG "boost-1.77.0"
)

cxxopts

# the install option has to be explicitly set to allow installation
CPMAddPackage(
  GITHUB_REPOSITORY jarro2783/cxxopts
  VERSION 2.2.1
  OPTIONS "CXXOPTS_BUILD_EXAMPLES NO" "CXXOPTS_BUILD_TESTS NO" "CXXOPTS_ENABLE_INSTALL YES"
)

google/benchmark

CPMAddPackage(
  NAME benchmark
  GITHUB_REPOSITORY google/benchmark
  VERSION 1.5.2
  OPTIONS "BENCHMARK_ENABLE_TESTING Off"
)

if(benchmark_ADDED)
  # enable c++11 to avoid compilation errors
  set_target_properties(benchmark PROPERTIES CXX_STANDARD 11)
endif()

Lua

) endif()">
CPMAddPackage(
  NAME lua
  GIT_REPOSITORY https://github.com/lua/lua.git
  VERSION 5.3.5
  DOWNLOAD_ONLY YES
)

if (lua_ADDED)
  # lua has no CMake support, so we create our own target

  FILE(GLOB lua_sources ${lua_SOURCE_DIR}/*.c)
  list(REMOVE_ITEM lua_sources "${lua_SOURCE_DIR}/lua.c" "${lua_SOURCE_DIR}/luac.c")
  add_library(lua STATIC ${lua_sources})

  target_include_directories(lua
    PUBLIC
      $<BUILD_INTERFACE:${lua_SOURCE_DIR}>
  )
endif()

For a full example on using CPM to download and configure lua with sol2 see here.

Full Examples

See the examples directory for full examples with source code and check out the wiki for many more example snippets.

Issues
  • Scope package options to avoid changing the local scope

    Scope package options to avoid changing the local scope

    This is the fix for #222, but I found a strange behaviour. Bellow is a test code :

    cmake_minimum_required(VERSION 3.14)
    project(TestOptions)
    
    include("cmake/CPM.cmake")
    
    set(SET "main")
    message(STATUS "From main before set:${SET}, option: ${OPT}")
    
    
    CPMAddPackage(
      NAME titi
      GIT_REPOSITORY https://gitlab.com/flagarde/titi
      GIT_TAG main 
      OPTIONS "OPT ON" "SET YU"
    )
    message(STATUS "From main between set:${SET}, option: ${OPT}")
    
    CPMAddPackage(
      NAME toto
      GIT_REPOSITORY https://gitlab.com/flagarde/toto
      GIT_TAG main 
      OPTIONS "OPT OFF" "SET CHANGE"
    )
    
    message(STATUS "From main after set:${SET}, option: ${OPT}")
    

    First run gives:

    -- The C compiler identification is GNU 10.2.0
    -- The CXX compiler identification is GNU 10.2.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- From main before set:main, option: 
    -- CPM: adding package [email protected] (main)
    -- From titi, set: titi default was "titi" , option: ON default was "FALSE"
    -- From main between set:main, option: 
    -- CPM: adding package [email protected] (main)
    -- From toto, set: CHANGE default was "toto" , option: OFF default was "TRUE"
    -- From main after set:main, option: 
    -- Configuring done
    -- Generating done
    

    -- From titi, set: titi default was "titi" , option: ON default was "FALSE" should be -- From titi, set: YU default was "titi" , option: ON default was "FALSE".

    Second gives the good results :

    -- From main before set:main, option: 
    -- CPM: adding package [email protected] (main)
    -- From titi, set: YU default was "titi" , option: ON default was "FALSE"
    -- From main between set:main, option: 
    -- CPM: adding package [email protected] (main)
    -- From toto, set: CHANGE default was "toto" , option: OFF default was "TRUE"
    -- From main after set:main, option: 
    -- Configuring done
    -- Generating done
    
    opened by flagarde 28
  • Allowing EXCLUDE_FROM_ALL

    Allowing EXCLUDE_FROM_ALL

    Hi @TheLartians ,

    Thanks for the library.

    When I include a CMake library with CPM.cmake it runs all the install commands in that library even when I don't need these installers with my own library.

    When adding the library as a subdirectory, it's possible to use add_subdirectory(libname EXCLUDE_FROM_ALL) to avoid that behavior.

    Is it possible to use EXCLUDE_FROM_ALL when downloading a CMake library?

    I don't know if that's a question or an enhancement.

    Best,

    enhancement 
    opened by alandefreitas 24
  • Parent project options are being cancelled

    Parent project options are being cancelled

    If the parent project has an option that conflicts with the child project, the child project is messing with the scope of the parent project.

    For instance

    message("BUILD_EXAMPLES=${BUILD_EXAMPLES}")
    CPMAddPackage(
            NAME pareto
            GIT_REPOSITORY https://github.com/alandefreitas/pareto.git
            GIT_TAG v1.2.0
            OPTIONS
            "BUILD_MATPLOT_TARGETS OFF"
            "BUILD_EXAMPLES OFF"
    )
    add_executable(spatial_containers spatial_containers.cpp)
    target_link_libraries(spatial_containers PUBLIC pareto)
    message("BUILD_EXAMPLES=${BUILD_EXAMPLES}")
    

    gives me

    BUILD_EXAMPLES=ON
    -- CPM: adding package [email protected] (v1.2.0)
    -- Looking for min
    -- Looking for min - not found
    BUILD_EXAMPLES=OFF
    

    which is a problem because some option names are quite common. Some projects create have prefixes in their options but most projects don't.

    Of course, people can manually do

    set(BUILD_EXAMPLES_PREV ${BUILD_EXAMPLES})
    message("BUILD_EXAMPLES=${BUILD_EXAMPLES}")
    CPMAddPackage(
            NAME pareto
            GIT_REPOSITORY https://github.com/alandefreitas/pareto.git
            GIT_TAG v1.2.0
            OPTIONS
            "BUILD_EXAMPLES OFF"
    )
    add_executable(spatial_containers spatial_containers.cpp)
    target_link_libraries(spatial_containers PUBLIC pareto)
    set(BUILD_EXAMPLES ${BUILD_EXAMPLES_PREV} CACHE BOOL "" FORCE)
    message("BUILD_EXAMPLES=${BUILD_EXAMPLES}")
    

    for all options but that defeats the purpose of the OPTIONS arguments, which is to do what we cannot already do with FetchContent.

    bug 
    opened by alandefreitas 19
  • Confused by the build stage

    Confused by the build stage

    I am wondering if someone could help me understand an issue that I have with the CPM. I can integrated it, no problem. But for some reason, when I build my project. CPM starts to mix up everything. It creates a lib, and bin directory in my build directory and shuffles everything around. I don't exactly know what happened that CPM doesn't put things in their respected -build, -install folders anymore.

    I should probably mention that I'm using the ExternalPackage as well, and direct them to the same _deps directory. But, I don't think that should cause the problem. I feel that somehow, CPM triggers an install target for some reason! I am not sure.

    Thanks for your help in advance!

    opened by amirmasoudabdol 18
  • How to only include public headers?

    How to only include public headers?

    Module in question https://github.com/martell/pthreads-win32.cmake/blob/master/CMakeLists.txt

    This is a cmake adaptation on top of the original pthreads-win32 library. The original library has header/source file in a single directory.

    The cmake adaptation makes proper install targets and move the header/complied libs into the proper location (see below)

    install(TARGETS ${PTHREADS_LIBRARY}
    	RUNTIME DESTINATION ${PTHREADS_BINDIR} COMPONENT ${PTHREADS_BINCOMPONENT}
    	LIBRARY DESTINATION ${PTHREADS_LIBDIR} COMPONENT ${PTHREADS_LIBCOMPONENT}
    	ARCHIVE DESTINATION ${PTHREADS_LIBDIR} COMPONENT ${PTHREADS_LIBCOMPONENT}
    	PUBLIC_HEADER DESTINATION ${PTHREADS_INCLUDEDIR} COMPONENT ${PTHREADS_INCLUDECOMPONENT})
    

    When adding this library using CPMAddPackage(), I needed to do something like target_include_libraries(TARGET INTERFACE <PATH_TO_SOURCE_DIR>) This adds all .h files as include headers, not just the public header.

    My understanding is that CPM does not trigger the "install" step, but just the "configure/build" steps when adding a package.

    Is there anyway to only include the public header?

    Thank you!

    Here's how I am adding that library via CPM

    # ---- pthreads for MSVC-----------
    if(MSVC)
      CPMAddPackage(
              NAME pthreads-win32
              SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../external/pthreads-win32
      )
      print_target_properties(pthreadsVC2)
    endif()
    

    The print_target_properties is a debug function to dump all target properties, its output is:

    Library name of pthreads-win32: pthreadsVC2.
    pthreadsVC2 AUTOGEN_ORIGIN_DEPENDS = ON
    pthreadsVC2 AUTOMOC_COMPILER_PREDEFINES = ON
    pthreadsVC2 AUTOMOC_MACRO_NAMES = Q_OBJECT;Q_GADGET;Q_NAMESPACE
    pthreadsVC2 AUTOMOC_PATH_PREFIX = ON
    pthreadsVC2 BINARY_DIR = C:/Users/justb/Repos/kintek-explorer/cmake-build-debug/_deps/pthreads-win32-build
    pthreadsVC2 BUILD_WITH_INSTALL_RPATH = FALSE
    pthreadsVC2 DEBUG_POSTFIX = d
    pthreadsVC2 IMPORTED = FALSE
    pthreadsVC2 IMPORTED_GLOBAL = FALSE
    pthreadsVC2 INCLUDE_DIRECTORIES = C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32
    pthreadsVC2 INSTALL_NAME_DIR = @executable_path/../lib
    pthreadsVC2 INSTALL_RPATH = $ORIGIN/../lib
    pthreadsVC2 INSTALL_RPATH_USE_LINK_PATH = TRUE
    pthreadsVC2 NAME = pthreadsVC2
    pthreadsVC2 POSITION_INDEPENDENT_CODE = True
    pthreadsVC2 PUBLIC_HEADER = C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/pthread.h;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/sched.h;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/semaphore.h
    pthreadsVC2 SKIP_BUILD_RPATH = FALSE
    pthreadsVC2 SOURCES = C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/attr.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/barrier.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/cancel.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/cleanup.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/condvar.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/create.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/dll.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/autostatic.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/errno.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/exit.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/fork.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/global.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/misc.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/mutex.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/nonportable.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/private.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/rwlock.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/sched.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/semaphore.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/signal.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/spin.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/sync.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/tsd.c;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/pthread.h;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/sched.h;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/semaphore.h;C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32/pthreads-win32/version.rc
    pthreadsVC2 SOURCE_DIR = C:/Users/justb/Repos/kintek-explorer/external/pthreads-win32
    pthreadsVC2 TYPE = SHARED_LIBRARY
    pthreadsVC2 UNITY_BUILD_BATCH_SIZE = 8 
    
    enhancement help desk 
    opened by bolu-atx 17
  • Unknown CMake command

    Unknown CMake command "CPMAddPackage"

    Hi, I'm facing this problem when reloading the CMake configuration on CLion.

    Unknown CMake command "CPMAddPackage"

    The problem disappears if I remove the checks that starts with if(CPM_DIRECTORY) in the CPM.cmake. What I can tell you is that it comes from the CMakeCache.txt, there's probably a cached option that is preventing your script from going on and declare the functions needed.

    Tried with both the bundled CMake 3.17 that the latest CMake binaries (3.19+).

    opened by NicholasBertazzon 15
  • Trouble linking crossplatform library 🙏

    Trouble linking crossplatform library 🙏

    Full reproduction: https://github.com/developer239/test_cpm Repository that I can't link: https://github.com/smasherprog/screen_capture_lite

    # CMAkeList.txt
    
    cmake_minimum_required(VERSION 3.19)
    project(test_cpm)
    
    set(CMAKE_CXX_STANDARD 14)
    
    # CPM
    set(CPM_DOWNLOAD_VERSION 0.27.2)
    set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
    
    if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
        message(STATUS "Downloading CPM.cmake")
        file(DOWNLOAD https://github.com/TheLartians/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake ${CPM_DOWNLOAD_LOCATION})
    endif()
    
    include(${CPM_DOWNLOAD_LOCATION})
    
    # EXECUTABLES
    
    add_executable(test_cpm main.cpp)
    
    # DEPENDENCIES
    
    CPMAddPackage(NAME spdlog GITHUB_REPOSITORY gabime/spdlog VERSION 1.7.0)
    
    CPMAddPackage(
            NAME Screen_Capture
            GITHUB_REPOSITORY smasherprog/screen_capture_lite
            GIT_TAG 17.0.3
    )
    
    target_link_libraries(test_cpm spdlog Screen_Capture)
    
    # main.cpp
    
    #include <spdlog/spdlog.h>
    #include <Screen_Capture.h>
    
    int main() {
        spdlog::info("Hello world!");
        return 0;
    }
    

    Log:

    Maybe I misunderstood how does the linking work? 🤔 I had very similar problem with opencv.

    fatal error: 'Screen_Capture.h' file not found
    #include <Screen_Capture.h>
    

    image

    opened by developer239 13
  • Setting CPM_SOURCE_ROOT from the environment

    Setting CPM_SOURCE_ROOT from the environment

    I use similar dependencies for various project, so that new feature would help me a lot. Is there a way to setup an environment variable for it? I would set CPM_SOURCE_ROOT per machine/user not per project. I would point in to $HOME/.cache/CPM or similar

    enhancement 
    opened by aggsol 10
  • Weird issue with CPM_SOURCE_CACHE and FetchContent

    Weird issue with CPM_SOURCE_CACHE and FetchContent

    In the top-level project there is https://github.com/vtil-project/VTIL-Utils/blob/master/cmake/VTIL-Core.cmake:

    CPMAddPackage(
        NAME VTIL-Core
        GIT_REPOSITORY https://github.com/mrexodia/VTIL-Core
        GIT_TAG e6debb384cb218caff8cb94f50f00076b994a762
    )
    

    And after that it includes https://github.com/vtil-project/VTIL-Utils/blob/master/cmake/VTIL-NativeLifters.cmake:

    CPMAddPackage(
        NAME VTIL-NativeLifters
        GIT_REPOSITORY https://github.com/vtil-project/VTIL-NativeLifters
        GIT_TAG f8837ef4d2412a5a1c25f725f25685a23e1cf1a1
    )
    

    Inside the VTIL-NativeLifters repo there is a FetchContent call with the name VTIL-Core, The idea here is that you can pin a different version of VTIL-Core in your project that will then be used to compile the VTIL-NativeLifters library.

    https://github.com/vtil-project/VTIL-NativeLifters/blob/master/Dependencies/CMakeLists.txt#L4:

    include(FetchContent)
    
    message(STATUS "Fetching VTIL-Core (this might take a while)...")
    FetchContent_Declare(
        VTIL-Core
        GIT_REPOSITORY https://github.com/vtil-project/VTIL-Core
        GIT_TAG        eeffb26b8b9ef7b4bd6ffbfc09f3133b70b36eda
        GIT_SHALLOW    false
    )
    FetchContent_MakeAvailable(VTIL-Core)
    

    When using CPM_SOURCE_CACHE CMake errors out:

    D:\CodeBlocks\VTIL-Utils\build>cmake ..
    -- Building for: Visual Studio 16 2019
    -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
    -- The C compiler identification is MSVC 19.29.30038.1
    -- The CXX compiler identification is MSVC 19.29.30038.1
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Fetching capstone (this might take a while)...
    CMake Deprecation Warning at build/_deps/capstone-src/CMakeLists.txt:1 (cmake_minimum_required):
      Compatibility with CMake < 2.8.12 will be removed from a future version of
      CMake.
    
      Update the VERSION argument <min> value or use a ...<max> suffix to tell
      CMake that the project does not need compatibility with older versions.
    
    
    CMake Deprecation Warning at build/_deps/capstone-src/CMakeLists.txt:18 (cmake_policy):
      The OLD behavior for policy CMP0048 will be removed from a future version
      of CMake.
    
      The cmake-policies(7) manual explains that the OLD behaviors of all
      policies are deprecated and that a policy should be set to OLD only under
      specific short-term circumstances.  Projects should be ported to the NEW
      behavior and not rely on setting a policy to OLD.
    
    
    Enabling CAPSTONE_ARM_SUPPORT
    Enabling CAPSTONE_ARM64_SUPPORT
    Enabling CAPSTONE_M68K_SUPPORT
    Enabling CAPSTONE_MIPS_SUPPORT
    Enabling CAPSTONE_PPC_SUPPORT
    Enabling CAPSTONE_SPARC_SUPPORT
    Enabling CAPSTONE_SYSZ_SUPPORT
    Enabling CAPSTONE_XCORE_SUPPORT
    Enabling CAPSTONE_X86_SUPPORT
    Enabling CAPSTONE_TMS320C64X_SUPPORT
    Enabling CAPSTONE_M680X_SUPPORT
    Enabling CAPSTONE_EVM_SUPPORT
    Enabling CAPSTONE_MOS65XX_SUPPORT
    -- Fetching keystone (this might take a while)...
    -- Looking for pthread.h
    -- Looking for pthread.h - not found
    -- Found Threads: TRUE
    -- CPM: adding package [email protected] (e6debb384cb218caff8cb94f50f00076b994a762 at d:/cpm_cache/vtil-core/b00df6cc2b142d6fa5bce7908fa7339da177c741)
    -- Fetching VTIL-Core (this might take a while)...
    CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/FetchContent.cmake:1206 (add_subdirectory):
      The binary directory
    
        D:/CodeBlocks/VTIL-Utils/build/_deps/vtil-core-build
    
      is already used to build a source directory.  It cannot be used to build
      source directory
    
        D:/CodeBlocks/VTIL-Utils/build/_deps/vtil-core-src
    
      Specify a unique binary directory name.
    Call Stack (most recent call first):
      D:/cpm_cache/vtil-nativelifters/b0b7a3915a18707147fb220d4cf2d2f76e9d8d8d/Dependencies/CMakeLists.txt:10 (FetchContent_MakeAvailable)
    
    
    -- CPM: adding package [email protected] (f8837ef4d2412a5a1c25f725f25685a23e1cf1a1 at d:/cpm_cache/vtil-nativelifters/b0b7a3915a18707147fb220d4cf2d2f76e9d8d8d)
    -- CPM: adding package [email protected] (ae22269df734a2b0957a9ab4e37be41f61866dbe at d:/cpm_cache/args/0fef5c19d6fb87e7b5acefd2362b022afaf2dab6)
    -- CPM: adding package [email protected] (v0.0.5 at d:/cpm_cache/cpmlicenses.cmake/2e9893c848f8cf158d41d1c4737a276bac779ef3)
    -- Configuring incomplete, errors occurred!
    See also "D:/CodeBlocks/VTIL-Utils/build/CMakeFiles/CMakeOutput.log".
    See also "D:/CodeBlocks/VTIL-Utils/build/CMakeFiles/CMakeError.log".
    

    Without CPM_SOURCE_CACHE everything works as intended:

    D:\CodeBlocks\VTIL-Utils\build>cmake ..
    -- Building for: Visual Studio 16 2019
    -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
    -- The C compiler identification is MSVC 19.29.30038.1
    -- The CXX compiler identification is MSVC 19.29.30038.1
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- CPM: adding package [email protected] (e6debb384cb218caff8cb94f50f00076b994a762)
    -- Fetching capstone (this might take a while)...
    CMake Deprecation Warning at build/_deps/capstone-src/CMakeLists.txt:1 (cmake_minimum_required):
      Compatibility with CMake < 2.8.12 will be removed from a future version of
      CMake.
    
      Update the VERSION argument <min> value or use a ...<max> suffix to tell
      CMake that the project does not need compatibility with older versions.
    
    
    CMake Deprecation Warning at build/_deps/capstone-src/CMakeLists.txt:18 (cmake_policy):
      The OLD behavior for policy CMP0048 will be removed from a future version
      of CMake.
    
      The cmake-policies(7) manual explains that the OLD behaviors of all
      policies are deprecated and that a policy should be set to OLD only under
      specific short-term circumstances.  Projects should be ported to the NEW
      behavior and not rely on setting a policy to OLD.
    
    
    Enabling CAPSTONE_ARM_SUPPORT
    Enabling CAPSTONE_ARM64_SUPPORT
    Enabling CAPSTONE_M68K_SUPPORT
    Enabling CAPSTONE_MIPS_SUPPORT
    Enabling CAPSTONE_PPC_SUPPORT
    Enabling CAPSTONE_SPARC_SUPPORT
    Enabling CAPSTONE_SYSZ_SUPPORT
    Enabling CAPSTONE_XCORE_SUPPORT
    Enabling CAPSTONE_X86_SUPPORT
    Enabling CAPSTONE_TMS320C64X_SUPPORT
    Enabling CAPSTONE_M680X_SUPPORT
    Enabling CAPSTONE_EVM_SUPPORT
    Enabling CAPSTONE_MOS65XX_SUPPORT
    -- Fetching keystone (this might take a while)...
    -- Looking for pthread.h
    -- Looking for pthread.h - not found
    -- Found Threads: TRUE
    -- CPM: adding package [email protected] (f8837ef4d2412a5a1c25f725f25685a23e1cf1a1)
    -- Fetching VTIL-Core (this might take a while)...
    -- CPM: adding package [email protected] (ae22269df734a2b0957a9ab4e37be41f61866dbe)
    -- CPM: adding package [email protected] (v0.0.5)
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/CodeBlocks/VTIL-Utils/build
    

    This is cmake 3.20.5 btw

    opened by mrexodia 9
  • find_package and CPMFindPackage have different behaviors

    find_package and CPMFindPackage have different behaviors

    Hello,

    I'm using CPMFindPackage() to check for a dependency on CMocka and noticing some strange behavior with the find_package portion. Do you know what I might be doing wrong here?

    CPMFindPackage(
      NAME CMOCKA
      GIT_REPOSITORY https://git.cryptomilk.org/projects/cmocka.git/
      VERSION 1.1.5
      GIT_TAG cmocka-1.1.5
      OPTIONS
        "WITH_EXAMPLES OFF"
    )
    
    message("CMOCKA_FOUND: ${CMOCKA_FOUND}")
    message("CMOCKA_ADDED: ${CMOCKA_ADDED}")
    message("CMOCKA_INCLUDES: ${CMOCKA_INCLUDE_DIR}")
    message("CMOCKA_LIBRARIES: ${CMOCKA_LIBRARIES}")
    

    The library is installed on my system with a CMake config file. I see this output from CPM, but the FOUND/ADDED variables are not set, and the other variables defined by the config file aren't used.

    -- CPM: using local package [email protected]
    CMOCKA_FOUND:
    CMOCKA_ADDED:
    CMOCKA_INCLUDES:
    CMOCKA_LIBRARIES:
    

    If I remove CPMFindPackage and add find_package:

    find_package(CMOCKA)
    

    This time, CMOCKA_FOUND will be defined, and the values defined by the config file are used.

    CMOCKA_FOUND: 1
    CMOCKA_ADDED:
    CMOCKA_INCLUDES: /usr/local/include
    CMOCKA_LIBRARIES: /usr/local/lib/libcmocka.dylib
    
    documentation 
    opened by phillipjohnston 9
  • Fix <package>_SOURCE_DIR and _BINARY_DIR handling when caching is active

    Fix _SOURCE_DIR and _BINARY_DIR handling when caching is active

    Today I struggled a bit with a project of mine, where I used CPMAddPackage on exactly the same dependency but on different hirarchies of my project. The first add was fine, but the second did neither set the <package>_SOURCE_DIR nor <package>_BINARY_DIR. There are some other issues around, that might be related to this topic (#227 #281 )

    I did some code digging and this is what I think causes the issue: The first CPMAddPackage runs until the end of the function, but because the package is already in the local cache, it will skip the fetch case (~Line 672). Because of this skip, FetchContent doesn't know about the package. When CPMAddPackage is called the next time on the same package, CPM already knows that the package has been added (around line 536) and trys to load the SOURCE_DIR and BINARY_DIR from the FetchContent, but those have never been set, thus both variables will be empty.

    My solution is to utilize the cmake cache mechanism, but I really don't know if thats the best way to do it. Feel free to correct me ;)

    opened by DNKpp 8
  • CPM_DIRECTORY always stores absolute non symlink paths

    CPM_DIRECTORY always stores absolute non symlink paths

    When CPM is brought into a project via downloading it will be placed in the build directory. When the build directory is a symlink the CPM_DIRECTORY value will hold the symlink value. This means that trying to run CMake via the real build directory will cause CPM to fail since it considers the current CMAKE_CURRENT_LIST_DIR to be different and will early exit.

    This resolves the issue be always getting CMake to resolve symlinks before comparing paths for CPM_DIRECTORY.

    opened by robertmaynard 0
  • Eigen and package_lock

    Eigen and package_lock

    I recently tried adding Eigen from the latest gitlab release. That's working fine, but I had a hard time making it work with a package lock and in the end I gave up. The example here https://github.com/cpm-cmake/CPM.cmake/wiki/More-Snippets#eigen shows how to make it work via custom target, but the Eigen_ADDED is not set when using the combination CPMDeclarePackage and CPMGetPackage combination. Can someone enlighten me? :D

    opened by DNKpp 0
  • heads up: CMake 3.25 `SYSTEM` option for FetchContent

    heads up: CMake 3.25 `SYSTEM` option for FetchContent

    Here's the motivating issue in CMake's issue tracker. FetchContent uses ExternalProject_Add, which uses add_subdirectory, which is unlike importing via find_package in that the targets that get added will not be IMPORTED, and will therefore have their target_include_directories not marked as SYSTEM, which means compilers will check those third party headers to warn for things that the user only wanted warnings for for their own project's code (not for third party header code).

    Here's the ticket tracking the solution that was proposed and is now being implemented. In summary,

    1. Add a SYSTEM property for targets
    2. ...
    3. As a helper based on the SYSTEM property, implement add_subdirectory(.. SYSTEM) and FetchContent_Declare(.. SYSTEM BOOL)

    At the time of this writing, these changes are not merged in yet, and I'm not sure, but I don't think CMake 3.25 will be released until November, so it's still quite early to be mentioning this. I thought it would be nice to just put it on the radar so it doesn't go undetected.

    I'm guessing there will be some policy variable that can be checked to see if the CPM user's CMake version supports these new arguments, and if so, to add a similar parameter/option to CPMAddPackage.

    opened by david-fong 2
  • Two targets with the same name class when DOWNLOAD_ONLY ON

    Two targets with the same name class when DOWNLOAD_ONLY ON

    Suppose I have project A which depends on B. And suppose A and B both depend on D. But D isn't a cmake project. I can still use CPM to access D using the DOWNLOAD_ONLY option. For example,

    CPMAddPackage(
      NAME D
      VERSION 1.0.0
      GITHUB_REPOSITORY "blabla/C"
      GIT_TAG "v1.0.0"
      DOWNLOAD_ONLY ON
    )
    
    add_library(D
      ${D_SOURCE_DIR}/src/source_file.f90
    )
    

    However, A will now have a problem, because there will be two targets named D, and cmake will throw an error. How can this be resolved?

    help desk 
    opened by Nicholaswogan 1
  • how to set CPM_DOWNLOAD_ALL?

    how to set CPM_DOWNLOAD_ALL?

    I'm a new in cmake and cpm. I don't know where to set it. I don't know how to set it. I just wanna reuse sources and builds. readme.md does not cover all caes I don't know. So would you explain it to me?Thank you.

    help desk 
    opened by StromanStroman 1
  • Problems including SDL

    Problems including SDL

    I'm trying to use CPM in conjunction with https://github.com/libsdl-org/SDL and it is quite a wild ride. As per official practice you include the modules with #include <SDL2/SDL_xxxxxx.h> which matches how SDL presents the inclusions when built & installed.

    Unfortunately however, SDL's inclusions folders in the source code do not match this exported pattern. The headers are inside the naked include folder in the root of the source tree.

    This breaks code inclusion with CPM because the headers are expected in a different folder. I can include it with #include <SDL_xxxxxx.h> but then it will break when it finds SDL already installed on the user's system.

    I'm searching through ALL the samples included in CPM, and all the libraries use the proper/consistent folder pattern. Is there a way already built into CPM to combat this discrepancy that I can leverage? Or am I stuck having to do some hacky magic with folders myself?

    opened by Banderi 8
Releases(v0.35.2)
Owner
CPM.cmake
CMake's missing package manager.
CPM.cmake
Non-intrusive CMake dependency management

cmodule Non-intrusive CMake dependency management. Normally CMake's find_package() looks for packages installed on host system (and compiled for host

scapix.com 13 Jun 16, 2022
CMake wrapper for Xrepo C and C++ package manager

xrepo-cmake CMake wrapper for Xrepo C and C++ package manager. Supporting the project Support this project by becoming a sponsor. Your logo will show

xmake-io 19 May 13, 2022
Autotools-style configure script wrapper around CMake

configure-cmake configure-cmake is an autotools-style configure script for CMake-based projects. People building software on Linux or BSD generally ex

Evan Nemerson 81 Jul 1, 2022
A CMake addon that avoids you writing boilerplate code for resource management.

SHader INJ(I)ector SHINJI (originally SHader INJector) is a CMake addon that avoids you writing boilerplate code for resource management and exposes s

Lorenzo Rutayisire 6 Mar 21, 2022
C package manager-ish

clib(1) Package manager for the C programming language. Installation Expects libcurl to be installed and linkable. With homebrew: $ brew install clib

clibs 4.4k Jul 27, 2022
C++ Package Manager

CPM Note CPM is not being actively maintained. I plan on keeping the website active but don't plan on making further modifications to the codebase. If

James 717 Jul 25, 2022
Examples of using Hunter package manager to build and run Android application.

Examples of using Hunter package manager to build and run Android application. Requirements Android NDK Go to download page and choose NDK for your pl

null 34 Mar 13, 2022
Enhanced CMake Project Manager plugin for Qt Creator

CMakeProjectManager2 Alternative CMake support for Qt Creator. Main differents from original CMakeProject plugin: Project file list readed from file s

Alexander Drozdov 71 May 24, 2022
CMake checks cache helper modules – for fast CI CMake builds!

cmake-checks-cache Cross platform CMake projects do platform introspection by the means of "Check" macros. Have a look at CMake's How To Write Platfor

Cristian Adam 59 Jul 7, 2022
CMake scripts for painless usage of SuiteSparse+METIS from Visual Studio and the rest of Windows/Linux/OSX IDEs supported by CMake

CMake scripts for painless usage of Tim Davis' SuiteSparse (CHOLMOD,UMFPACK,AMD,LDL,SPQR,...) and METIS from Visual Studio and the rest of Windows/Lin

Jose Luis Blanco-Claraco 384 Jul 27, 2022
cmake-font-lock - Advanced, type aware, highlight support for CMake

cmake-font-lock - Advanced, type aware, highlight support for CMake

Anders Lindgren 37 Dec 30, 2021
cmake-avr - a cmake toolchain for AVR projects

cmake-avr - a cmake toolchain for AVR projects Testing the example provided The toolchain was created and tested within the following environment: Lin

Matthias Kleemann 156 Jun 20, 2022
Make CMake less painful when trying to write Modern Flexible CMake

Izzy's eXtension Modules IXM is a CMake library for writing Modern flexible CMake. This means: Reducing the amount of CMake written Selecting reasonab

IXM 105 Jul 18, 2022
CMake module to enable code coverage easily and generate coverage reports with CMake targets.

CMake-codecov CMake module to enable code coverage easily and generate coverage reports with CMake targets. Include into your project To use Findcodec

HPC 77 Jul 3, 2022
unmaintained - CMake module to activate certain C++ standard, feature checks and appropriate automated workarounds - basically an improved version of cmake-compile-features

Compatibility This library provides an advanced target_compile_features() and write_compiler_detection_header(). The problem with those is that they a

Jonathan Müller 72 Apr 14, 2022
[CMake] [BSD-2] CMake module to find ICU

FindICU.cmake A CMake module to find International Components for Unicode (ICU) Library Note that CMake, since its version 3.7.0, includes a FindICU m

julp 29 Apr 26, 2022
A small c++ template with modern CMake

C++/CMake modern boilerplate This is a template for new projects, gives a good CMake base and a few dependencies you most likely want in your project.

Clément Grégoire 261 Aug 1, 2022
A versatile script engine abstraction layer.

ScriptX A versatile script engine abstraction layer ScriptX is a script engine abstraction layer. A variety of script engines are encapsulated on the

Tencent 353 Jul 28, 2022
C++ Library Manager for Windows, Linux, and MacOS

Vcpkg: Overview 中文总览 Español 한국어 Français Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are constant

Microsoft 16.4k Aug 5, 2022