cmake find_package examples

Signatures

find_package(<PackageName> [version] [EXACT] [QUIET] [MODULE]
  [REQUIRED|OPTIONAL] [[COMPONENTS] [components...]]
  [OPTIONAL_COMPONENTS components...]
  [REGISTRY_VIEW  (64|32|64_32|32_64|HOST|TARGET|BOTH)]
  [GLOBAL]
  [NO_POLICY_SCOPE]
  [BYPASS_PROVIDER]
)

Examples

IFL-CAMP/supra cmake/supraIncludeCephasonics.cmake :103

find_package(Boost 1.54.0 EXACT REQUIRED COMPONENTS system filesystem program_options thread)

prusa3d/PrusaSlicer cmake/modules/FindOpenVDB.cmake :36

find_package(OpenVDB
    [version] [EXACT]      # Minimum or EXACT version
    [REQUIRED]             # Fail with error if OpenVDB is not found
    [COMPONENTS <libs>...] # OpenVDB libraries by their canonical name
                           # e.g. "openvdb" for "libopenvdb"
    )

FreeCAD/FreeCAD src/Tools/embedded/Qt/cxx/CMakeLists.txt :20

find_package(PythonLibs ${Python3_VERSION} EXACT)

bambulab/BambuStudio cmake/modules/FindOpenVDB.cmake :36

find_package(OpenVDB
    [version] [EXACT]      # Minimum or EXACT version
    [REQUIRED]             # Fail with error if OpenVDB is not found
    [COMPONENTS <libs>...] # OpenVDB libraries by their canonical name
                           # e.g. "openvdb" for "libopenvdb"
    )

SoftFever/OrcaSlicer cmake/modules/FindOpenVDB.cmake :36

find_package(OpenVDB
    [version] [EXACT]      # Minimum or EXACT version
    [REQUIRED]             # Fail with error if OpenVDB is not found
    [COMPONENTS <libs>...] # OpenVDB libraries by their canonical name
                           # e.g. "openvdb" for "libopenvdb"
    )

RavEngine/RavEngine deps/SteamAudio-All/steam-audio/core/CMakeLists.txt :249

find_package(ISPC 1.12 EXACT)

zenustech/zeno projects/.unusedTools/cmake/FindBlosc.cmake :13

find_package(Blosc
    [version] [EXACT]      # Minimum or EXACT version e.g. 1.5.0
    [REQUIRED]             # Fail with error if Blosc is not found
    )

pioneerspacesim/pioneer CMakeLists.txt :227

find_package(Lua 5.2 EXACT REQUIRED)

etternagame/etterna extern/jwt-cpp-0.6.0/tests/cmake/CMakeLists.txt :6

find_package(jwt-cpp 0.6.0 EXACT REQUIRED CONFIG)

NREL/OpenStudio CMakeLists.txt :450

find_package(SWIG 4.1.1 EXACT REQUIRED CONFIG)

SsageParuders/Android_Native_Surface my_android_opencv/cmake/OpenCVDetectPython.cmake :140

find_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)

lizardfs/lizardfs cmake/Libraries.cmake :90

find_package(Polonaise ${POLONAISE_REQUIRED_VERSION} EXACT QUIET NO_MODULE NO_CMAKE_BUILDS_PATH)

chdb-io/chdb contrib/pybind11-cmake/CMakeLists.txt :10

find_package(Python ${PYBIND11_NONLIMITEDAPI_PYTHON_HEADERS_VERSION} EXACT REQUIRED COMPONENTS Interpreter Development)

NVIDIA/MatX cmake/rapids-cmake/testing/export/export-verify-explicit-patch-version-value-of-zero.cmake :62

find_package(test 21.09.0 EXACT REQUIRED)

NERSC/timemory cmake/Modules/ConfigPython.cmake :386

find_package(PythonInterp ${TIMEMORY_PYTHON_VERSION} EXACT REQUIRED)

ceph/ceph CMakeLists.txt :629

find_package(Python3 ${WITH_PYTHON3} EXACT REQUIRED
  COMPONENTS Interpreter Development)

gnuradio/gnuradio cmake/Modules/GrPython.cmake :27

find_package(PythonLibs ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} EXACT)

AcademySoftwareFoundation/openvdb cmake/FindBlosc.cmake :13

find_package(Blosc
    [version] [EXACT]      # Minimum or EXACT version e.g. 1.5.0
    [REQUIRED]             # Fail with error if Blosc is not found
    )

NREL/EnergyPlus CMakeLists.txt :194

find_package(Python ${Python_REQUIRED_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED)

hoffstadt/DearPyGui src/distribution.cmake :2

find_package (Python ${MV_PY_VERSION} EXACT COMPONENTS Development)

AcademySoftwareFoundation/OpenImageIO src/cmake/build_expat.cmake :50

find_package (EXPAT ${expat_BUILD_VERSION} EXACT REQUIRED)

manticoresoftware/manticoresearch cmake/GetColumnar.cmake :102

find_package ( columnar "${NEED_API_NUMERIC_VERSION}" EXACT COMPONENTS columnar_api secondary_api knn_api CONFIG )

eclipse-upm/upm cmake/modules/OpenCVDetectPython.cmake :63

find_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)

openstudiocoalition/OpenStudioApplication CMakeLists.txt :95

find_package(SWIG 4.1.1 EXACT REQUIRED CONFIG)

qCring/QuickVtk CMakeLists.txt :92

find_package(Qt5 ${QUICKVTK_QT_VERSION} EXACT CONFIG REQUIRED ${QUICKVTK_QT_MODULES})

LLNL/axom src/cmake/thirdparty/FindLUA.cmake :30

find_package(Lua 5.4 EXACT REQUIRED)

prophesee-ai/openeb cmake/custom_functions/python3.cmake :54

find_package(Python3 \${_python_version} EXACT COMPONENTS Interpreter Development REQUIRED)

pavelsevecek/OpenSPH cmake/FindBlosc.cmake :13

find_package(Blosc
    [version] [EXACT]      # Minimum or EXACT version e.g. 1.5.0
    [REQUIRED]             # Fail with error if Blosc is not found
    )

VowpalWabbit/vowpal_wabbit python/CMakeLists.txt :36

find_package(Python ${PY_VERSION} EXACT COMPONENTS Development REQUIRED)

mixxxdj/mixxx CMakeLists.txt :2944

find_package(DjInterop ${LIBDJINTEROP_VERSION} EXACT CONFIG)

Qihoo360/tensornet cmake/PrintPythonModule.cmake :14

find_package(
  Python3 ${PY_VER} EXACT
  COMPONENTS Development.Module
  REQUIRED)

Dreamtowards/Ethertia lib/sol2-3.3.0/CMakeLists.txt :234

find_package(Lua 5.1 EXACT REQUIRED)

nwnxee/unified Plugins/SWIG/CMakeLists.txt :1

find_package(SWIG 4.0.2 EXACT COMPONENTS csharp)

eiskaltdcpp/eiskaltdcpp CMakeLists.txt :112

find_package (Lua ${LUA_VERSION} EXACT REQUIRED)

Jackarain/proxy third_party/boost/tools/boost_install/BoostConfig.cmake :141

find_package(boost_${__boost_comp_nv} ${Boost_VERSION} EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})

IATBOMSW/ORB-SLAM2_DENSE CMakeLists.txt :53

find_package( PCL 1.7.2 EXACT REQUIRED )

chsl/PLADE code/3rd_party/opencv/cmake/OpenCVDetectPython.cmake :44

find_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT)

shogun-toolbox/shogun src/interfaces/python/CMakeLists.txt :3

FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED)

forestsen/KinectAzureDKProgramming CMakeLists.txt :88

find_package(azure-kinect-sensor-sdk 1.2.0 EXACT QUIET PATHS "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

freeorion/freeorion cmake/FindBoost.cmake :12

find_package(Boost
    [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
    [REQUIRED]             # Fail with error if Boost is not found
    [COMPONENTS <libs>...] # Boost libraries by their canonical name
                           # e.g. "date_time" for "libboost_date_time"
    [OPTIONAL_COMPONENTS <libs>...]
                           # Optional Boost libraries by their canonical name)
    )

elastic/ml-cpp cmake/variables.cmake :249

find_package(Boost ${Boost_VERSION} CONFIG EXACT REQUIRED COMPONENTS iostreams filesystem program_options regex date_time log log_setup thread unit_test_framework)

intel/systemc-compiler CMakeLists.txt :11

find_package(LLVM $ENV{LLVM_VER} EXACT REQUIRED CONFIG)

KDAB/KDReports python/CMakeLists.txt :29

find_package(PySide${PYSIDE_MAJOR_VERSION} ${QtWidgets_VERSION} EXACT REQUIRED)

ossia/libossia cmake/deps/boost.cmake :4

find_package(Boost 1.${BOOST_MINOR_MINIMAL} EXACT QUIET GLOBAL)

halide/Halide cmake/FindHalide_LLVM.cmake :57

find_package(
        Clang "${Halide_LLVM_VERSION}" EXACT
        HINTS
        "${LLVM_INSTALL_PREFIX}" # Same root as the LLVM we found
        "${LLVM_DIR}/../clang" # LLVM found in $ROOT/lib/cmake/llvm
        "${LLVM_DIR}/../lib/cmake/clang" # LLVM found in $ROOT/cmake
    )

chengzhengxin/sdm OpenCVSDK/x86/mingw/staticlib/OpenCVConfig.cmake :211

find_package(CUDA ${OpenCV_CUDA_VERSION} EXACT REQUIRED)

realm/realm-core src/realm/parser/CMakeLists.txt :2

find_package(BISON 3.8.2 EXACT)

mhx/dwarfs CMakeLists.txt :272

find_package(dwarfs ${PRJ_VERSION_MAJOR}.${PRJ_VERSION_MINOR}.${PRJ_VERSION_PATCH} EXACT REQUIRED CONFIG)

irods/irods cmake/Modules/FindCatch2.cmake :127

find_package(
        Catch2 "${Catch2_FIND_VERSION}" EXACT
        QUIET
        NO_MODULE
      )

stotko/stdgpu cmake/setup_clang_format.cmake :5

find_package(ClangFormat 18 EXACT)

DLR-SC/tigl cmake/FindBoost.cmake :12

find_package(Boost
    [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
    [REQUIRED]             # Fail with error if Boost is not found
    [COMPONENTS <libs>...] # Boost libraries by their canonical name
                           # e.g. "date_time" for "libboost_date_time"
    [OPTIONAL_COMPONENTS <libs>...]
                           # Optional Boost libraries by their canonical name)
    )

hailo-ai/hailort hailort/cmake/external/pybind11.cmake :26

find_package(Python3 ${PYBIND11_PYTHON_VERSION} REQUIRED EXACT COMPONENTS Interpreter Development)

ovsky/sumi-emu vcpkg_installed/x64-windows/share/boost/BoostConfig.cmake :67

find_package(boost_${__boost_comp_nv} ${Boost_VERSION} EXACT CONFIG ${_BOOST_REQUIRED} ${_BOOST_QUIET} HINTS ${_BOOST_CMAKEDIR})

apple/foundationdb cmake/CompileBoost.cmake :200

find_package(Boost 1.86.0 EXACT QUIET COMPONENTS context filesystem iostreams program_options serialization system url CONFIG PATHS ${BOOST_HINT_PATHS})

Ubpa/UDRefl cmake/InitUCMake.cmake :21

find_package(UCMake ${UCMake_VERSION} EXACT QUIET)

ZJU-FAST-Lab/FAST-Dynamic-Vision src/Utils/rviz_plugins/CMakeLists.txt :24

find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)

eProsima/Micro-XRCE-DDS-Agent cmake/SuperBuild.cmake :32

find_package(microxrcedds_client ${_microxrcedds_client_version} EXACT QUIET)

fifengine/fifengine CMakeLists.txt :893

find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT)

seyoulee/ParameterizedMotion CMakeLists.txt :22

find_package(Boost 1.69 EXACT COMPONENTS filesystem python36 numpy36 program_options)

ZJU-FAST-Lab/Fast-Racing src/sfc/DecompROS/decomp_ros_utils/CMakeLists.txt :20

find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)

joachimBurket/esp32-opencv cmake/OpenCVDetectPython.cmake :140

find_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)

Froser/gamemachine src/3rdparty/bullet3-2.87/CMakeLists.txt :317

FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT)

Qiskit/qiskit-aer cmake/dependency_utils.cmake :50

find_package(${package} ${version} EXACT QUIET)

zju-abclab/NEXUS thirdparty/SEAL-4.1-bs/native/bench/CMakeLists.txt :13

find_package(SEAL 4.1.1 EXACT REQUIRED)

graphcore/poptorch CMakeLists.txt :180

find_package(Torch ${TORCH_VERSION} EXACT REQUIRED)

buggins/coolreader cmake/modules/FindZSTD.cmake :20

find_package(ZSTD
    [version] [EXACT]      # Minimum or EXACT version e.g. 1.4.0
    [REQUIRED]             # Fail with error if zstd is not found
    )

Geant4/geant4 cmake/Modules/G4InterfaceOptions.cmake :202

find_package(Qt${QT_VERSION_MAJOR}3DCore ${QT_VERSION} EXACT QUIET)

lagadic/visp cmake/VISPDetectPython.cmake :136

find_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)

SwagSoftware/Kisak-Strike thirdparty/bullet3/CMakeLists.txt :350

FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT)

espressomd/espresso CMakeLists.txt :467

find_package(ClangTidy "${CMAKE_CXX_COMPILER_VERSION}" EXACT REQUIRED)

qt/qtwebengine configure.cmake :41

find_package(Gn ${QT_REPO_MODULE_VERSION} EXACT)

brunocodutra/metal cmake/Test.cmake :308

find_package(${_lib} ${_version} EXACT REQUIRED)

SCIInstitute/ShapeWorks CMakeLists.txt :21

find_package(Python3 3.9 EXACT REQUIRED COMPONENTS Interpreter Development)

nfs-ganesha/nfs-ganesha src/CMakeLists.txt :590

find_package (Python3 ${WITH_PYTHON3} EXACT REQUIRED COMPONENTS Interpreter)

syslog-ng/syslog-ng CMakeLists.txt :372

find_package(PythonInterp EXACT 3)

mltframework/mlt CMakeLists.txt :471

find_package(ClangFormat 14 EXACT)

eProsima/Micro-XRCE-DDS-Client CMakeLists.txt :138

find_package(${_name} ${_version} EXACT REQUIRED)

paulross/PythonExtensionPatterns CMakeLists.txt :49

FIND_PACKAGE (Python3 3.13 EXACT REQUIRED COMPONENTS Interpreter Development)

XRPL-Labs/xrpld-hooks Builds/CMake/deps/FindBoost.cmake :12

find_package(Boost
    [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
    [REQUIRED]             # Fail with error if Boost is not found
    [COMPONENTS <libs>...] # Boost libraries by their canonical name
                           # e.g. "date_time" for "libboost_date_time"
    [OPTIONAL_COMPONENTS <libs>...]
                           # Optional Boost libraries by their canonical name)
    )

ZJU-FAST-Lab/ego-planner src/uav_simulator/Utils/rviz_plugins/CMakeLists.txt :26

find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)

CrealityOfficial/CrealityPrint cmake/modules/FindOpenVDB.cmake :36

find_package(OpenVDB
    [version] [EXACT]      # Minimum or EXACT version
    [REQUIRED]             # Fail with error if OpenVDB is not found
    [COMPONENTS <libs>...] # OpenVDB libraries by their canonical name
                           # e.g. "openvdb" for "libopenvdb"
    )

nrfconnect/sdk-zephyr cmake/modules/FindZephyr-sdk.cmake :100

find_package(Zephyr-sdk 0.0.0 EXACT QUIET CONFIG PATHS ${zephyr_sdk_search_paths})

Cisco-Talos/clamav CMakeLists.txt :232

find_package(Python3 EXACT ${PYTHON_FIND_VERSION} REQUIRED)

sideeffects/HoudiniEngineForMaya CMakeLists.txt :32

find_package( Maya ${MAYA_VERSION} EXACT REQUIRED ${maya_libraries} )