The modules listed here are part of DkSDK CMake as part of a DkSDK subscription.


Subscriber access is required

Before you can use any of these modules you must have already done the DkSDK Subscriber Access Guide.

Setting up your project CMakeLists.txt

In your top-level CMakeLists.txt use the following:

cmake_minimum_required(VERSION 3.22)

# This section goes before you declare your project() include(FetchContent) FetchContent_Declare(dksdk-cmake GIT_REPOSITORY https://.../dksdk-cmake.git # You'll see examples below GIT_TAG main) FetchContent_GetProperties(dksdk-cmake) if (NOT dksdk-cmake_POPULATED) FetchContent_Populate(dksdk-cmake) list(APPEND CMAKE_MODULE_PATH ${dksdk-cmake_SOURCE_DIR}/cmake) endif ()

# ...

project( # ... )

The code above:

  1. By modifying the CMAKE_MODULE_PATH variable your project has access to all the DkSDK CMake modules listed in this section.

  2. Downloads the DkSDK CMake source code locally using the FetchContent module.

    You will want your FetchContent_Declare() to look like the following when you have a cloned repository from the DkSDK Subscriber Access Guide:

        # Pick ONE of the following:
        #   A. Cloned to a personal GitHub account?
        #   B. Cloned to a personal GitLab group?
        #   C. Cloned to an Enterprise GitHub account?
        #   D. Cloned to an GitLab Premier or Ultimate account?
        #   E. Cloned to an AWS CodeCommit repository?
      GIT_TAG main)

    In the rarer situation where you have been given a token to store in your CI provider's secure credentials, your GIT_REPOSITORY should look like:

      GIT_TAG main)

    and you will need to configure your CI to pass the secure credentials as the environment variable DKSDK_CMAKE_TOKEN.

Core Modules

These modules are loaded using the include() command:

For example, use any command from DkSDKProject by first doing:


Advanced Modules