cmake generate_export_header examples

Signatures

generate_export_header( LIBRARY_TARGET
  [BASE_NAME <base_name>]
  [EXPORT_MACRO_NAME <export_macro_name>]
  [EXPORT_FILE_NAME <export_file_name>]
  [DEPRECATED_MACRO_NAME <deprecated_macro_name>]
  [NO_EXPORT_MACRO_NAME <no_export_macro_name>]
  [INCLUDE_GUARD_NAME <include_guard_name>]
  [STATIC_DEFINE <static_define>]
  [NO_DEPRECATED_MACRO_NAME <no_deprecated_macro_name>]
  [DEFINE_NO_DEPRECATED]
  [PREFIX_NAME <prefix_name>]
  [CUSTOM_CONTENT_FROM_VARIABLE <variable>]
)

Examples

u3d-community/U3D Source/Urho3D/CMakeLists.txt :394

generate_export_header (${TARGET_NAME} EXPORT_MACRO_NAME URHO3D_API EXPORT_FILE_NAME Urho3D.h.new CUSTOM_CONTENT_FROM_VARIABLE APPENDIX)

f3d-app/f3d cmake/f3dPlugin.cmake :279

generate_export_header(f3d-plugin-${F3D_PLUGIN_NAME}
    EXPORT_FILE_NAME plugin_export.h
    EXPORT_MACRO_NAME F3D_PLUGIN_EXPORT)

prusa3d/PrusaSlicer src/occt_wrapper/CMakeLists.txt :20

generate_export_header(OCCTWrapper)

FreeCAD/FreeCAD src/3rdParty/libE57Format/cmake/Modules/E57ExportHeader.cmake :10

generate_export_header( E57Format
	EXPORT_FILE_NAME E57Export.h
	EXPORT_MACRO_NAME E57_DLL
	CUSTOM_CONTENT_FROM_VARIABLE comment
)

OGRECave/ogre Components/Bites/CMakeLists.txt :188

generate_export_header(OgreBites 
    EXPORT_MACRO_NAME _OgreBitesExport
    EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreBitesPrerequisites.h)

godlikepanos/anki-3d-engine ThirdParty/Sdl3/cmake/test/CMakeLists.txt :70

generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)

cadaver/turso3d ThirdParty/SDL/cmake/test/CMakeLists.txt :70

generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)

Hork-Engine/Hork-Source ThirdParty/SDL3/cmake/test/CMakeLists.txt :76

generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)

RavEngine/RavEngine deps/SDL/cmake/test/CMakeLists.txt :70

generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)

Kitware/VeloView Application/Ui/CMakeLists.txt :74

generate_export_header(ApplicationUi)

nextcloud/desktop shell_integration/dolphin/CMakeLists.txt :45

generate_export_header(${OWNCLOUDDOLPHINHELPER} BASE_NAME ownclouddolphinpluginhelper)

KDE/kdeplasma-addons applets/weather/ions/CMakeLists.txt :20

generate_export_header(weatherion)

ElyPrismLauncher/ElyPrismLauncher libraries/murmur2/CMakeLists.txt :12

generate_export_header(Launcher_murmur2)

end2endzone/ShellAnything CMakeLists.txt :249

GENERATE_EXPORT_HEADER( sa.core 
                        BASE_NAME shellanything 
                        EXPORT_MACRO_NAME SHELLANYTHING_EXPORT 
                        EXPORT_FILE_NAME ${SHELLANYTHING_EXPORT_HEADER} 
)

AcademySoftwareFoundation/OpenShadingLanguage src/include/CMakeLists.txt :13

generate_export_header (OSL
          # [BASE_NAME baseName]
          EXPORT_FILE_NAME export.h
          EXPORT_MACRO_NAME OSL_API
          NO_EXPORT_MACRO_NAME OSL_LOCAL
          STATIC_DEFINE OSL_STATIC_DEFINE
          DEPRECATED_MACRO_NAME OSL_DEPRECATED
          # [NO_DEPRECATED_MACRO_NAME noDeprecatedMacroName]
          # [DEFINE_NO_DEPRECATED]
          # [PREFIX_NAME prefix]
          CUSTOM_CONTENT_FROM_VARIABLE exportextras
          )

NREL/OpenStudio ruby/engine/CMakeLists.txt :141

generate_export_header(rubyengine)

KDE/digikam core/app/DigikamCoreTarget.cmake :86

generate_export_header(digikamcore BASE_NAME digikam EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/utils/digikam_core_export.h")

Kitware/kwiver CMake/utils/kwiver-utils-targets.cmake :277

generate_export_header( ${name}
      STATIC_DEFINE  ${upper_name}_BUILD_AS_STATIC
      )

erleben/OpenTissue OpenTissue/graphics/CMakeLists.txt :30

generate_export_header(OpenTissueGraphics
  BASE_NAME graphics
  EXPORT_MACRO_NAME GRAPHICS_API
  DEPRECATED_MACRO_NAME GRAPHICS_DEPRECATED_API
  PREFIX_NAME OT_
  ${NO_BUILD_DEPRECATED}
)

liminchen/OptCuts ext/libigl/external/stb_image/CMakeLists.txt :9

generate_export_header(${PROJECT_NAME})

nv-legate/legate share/legate/mpi_wrapper/CMakeLists.txt :69

generate_export_header(
  mpi_wrapper
    BASE_NAME        LEGATE_MPI_WRAPPER
    EXPORT_FILE_NAME "${binary_include_dir}/legate_mpi_wrapper/legate_mpi_wrapper_exports.h"
)

MultiMC/Launcher libraries/iconfix/CMakeLists.txt :21

generate_export_header(Launcher_iconfix)

PrismLauncher/PrismLauncher CMakeLists.txt :533

generate_export_header(qrcodegenerator)

PolyMC/PolyMC libraries/murmur2/CMakeLists.txt :12

generate_export_header(Launcher_murmur2)

CppMicroServices/CppMicroServices doc/src/examples/getting_started/CMakeLists.txt :41

generate_export_header(ServiceTime)

ossia/score cmake/ScoreTargetSetup.cmake :123

generate_export_header(${TheTarget} ALWAYS_EXPORT)

chdb-io/chdb contrib/mongo-cxx-driver-cmake/CMakeLists.txt :52

generate_export_header(_bsoncxx
        BASE_NAME BSONCXX
        EXPORT_MACRO_NAME BSONCXX_API
        NO_EXPORT_MACRO_NAME BSONCXX_PRIVATE
        EXPORT_FILE_NAME ${BSONCXX_BINARY_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/export.hpp
        STATIC_DEFINE BSONCXX_STATIC
)

Kitware/ParaView ThirdParty/CosmoHaloFinder/vtkcosmohalofinder/CMakeLists.txt :50

generate_export_header(cosmohalofinder
  EXPORT_MACRO_NAME VTKCOSMOHALOFINDER_EXPORT
  EXPORT_FILE_NAME  "vtkCosmoHaloFinderModule.h")

AMICI-dev/AMICI ThirdParty/sundials/src/sundials/CMakeLists.txt :158

generate_export_header(
  sundials_core BASE_NAME SUNDIALS
  EXPORT_FILE_NAME
  "${PROJECT_BINARY_DIR}/include/sundials/sundials_export.h"
)

SimVascular/SimVascular Code/CMake/SimVascularMacros.cmake :962

generate_export_header(${_MODULE_TARGET}
    ${_export_macro_names}
    EXPORT_FILE_NAME ${_MODULE_EXPORT_DIRECTIVE}Exports.h
    )

WerWolv/ImHex lib/libimhex/CMakeLists.txt :135

generate_export_header(libimhex)

vengi-voxel/vengi contrib/libs/sdl2/cmake/test/CMakeLists.txt :67

generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)

OpenNMT/Tokenizer CMakeLists.txt :114

generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/onmt/${PROJECT_NAME_LOWER}_export.h)

projectM-visualizer/projectm cmake/GenerateExportHeader.cmake :10

GENERATE_EXPORT_HEADER()

percona/percona-xtrabackup extra/libcbor/libcbor-0.11.0/src/CMakeLists.txt :21

generate_export_header(cbor EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/cbor/cbor_export.h)

NREL/EnergyPlus third_party/btwxt/src/CMakeLists.txt :30

generate_export_header(${PROJECT_NAME})

mysql/mysql-server extra/libcbor/libcbor-0.11.0/src/CMakeLists.txt :21

generate_export_header(cbor EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/cbor/cbor_export.h)

mysql/mysql-router src/harness/CMakeLists.txt :203

generate_export_header(harness-library
  BASE_NAME HARNESS
  EXPORT_FILE_NAME ${MySQLRouter_BINARY_DIR}/include/harness_export.h)

ebu/ear-production-suite ear-production-suite-plugins/lib/CMakeLists.txt :174

generate_export_header(ear-plugin-base
EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/ear-plugin-base/export.h
)

apache/kudu src/kudu/client/CMakeLists.txt :169

generate_export_header(kudu_client_exported
  BASE_NAME kudu
  EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/src/kudu/util/kudu_export.h)

Icinga/icinga2 lib/mysql_shim/CMakeLists.txt :17

generate_export_header(mysql_shim)

AcademySoftwareFoundation/OpenImageIO src/include/CMakeLists.txt :11

generate_export_header (${PROJECT_NAME}
          # [BASE_NAME baseName]
          EXPORT_FILE_NAME export.h
          EXPORT_MACRO_NAME ${PROJ_NAME}_API
          NO_EXPORT_MACRO_NAME ${PROJ_NAME}_LOCAL
          STATIC_DEFINE ${PROJ_NAME}_STATIC_DEFINE
          DEPRECATED_MACRO_NAME ${PROJ_NAME}_DEPRECATED
          # [NO_DEPRECATED_MACRO_NAME noDeprecatedMacroName]
          # [DEFINE_NO_DEPRECATED]
          # [PREFIX_NAME prefix]
          CUSTOM_CONTENT_FROM_VARIABLE exportextras
          )

cginternals/glbinding source/glbinding/CMakeLists.txt :185

generate_export_header(${target}
    EXPORT_FILE_NAME  ${export_file}
    EXPORT_MACRO_NAME ${export_macro}
)

KDE/qca CMakeLists.txt :384

generate_export_header(${QCA_LIB_NAME} BASE_NAME qca)

LLNL/axom src/axom/CMakeLists.txt :73

generate_export_header( ${_component} 
                            PREFIX_NAME AXOM_
                            EXPORT_FILE_NAME ${_export_header})

prophesee-ai/openeb hal/cpp/lib/CMakeLists.txt :41

GENERATE_EXPORT_HEADER(
    metavision_hal
    EXPORT_MACRO_NAME METAVISION_HAL_EXPORT
    EXPORT_FILE_NAME ${GENERATE_FILES_DIRECTORY}/include/metavision/hal/metavision_hal_export.h
    CUSTOM_CONTENT_FROM_VARIABLE _custom_export_content
)

KDE/k3b kioworkers/videodvd/CMakeLists.txt :15

generate_export_header(kio_videodvd
    EXPORT_MACRO_NAME VIDEODVD_EXPORT
    DEPRECATED_MACRO_NAME VIDEODVD_EXPORT_DEPRECATED
    EXPORT_FILE_NAME videodvd_export.h
)

open-dis/open-dis-cpp src/dis6/CMakeLists.txt :291

generate_export_header(OpenDIS6)

faaxm/spix libs/Core/CMakeLists.txt :112

generate_export_header(SpixCore
    EXPORT_FILE_NAME "Spix/spix_core_export.h"
)

vseasky/VersaAssistant assimp/contrib/zip/CMakeLists.txt :22

generate_export_header(${PROJECT_NAME})

OpenAssetIO/OpenAssetIO examples/manager/SimpleCppManager/CMakeLists.txt :84

generate_export_header(
    ${_target_name}
    EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/include/export.h
)

casadi/casadi casadi/CMakeLists.txt :38

generate_export_header(${name})

KiCad/kicad-source-mirror thirdparty/pybind11/tests/test_cross_module_rtti/CMakeLists.txt :41

generate_export_header(test_cross_module_rtti_lib)

BioMedIA/MIRTK CMake/Modules/mirtkAddLibrary.cmake :87

generate_export_header(${target_uid}
    PREFIX_NAME              "MIRTK_"
    BASE_NAME                "${PROJECT_NAME}"
    EXPORT_MACRO_NAME        "${PROJECT_NAME}_EXPORT"
    NO_EXPORT_MACRO_NAME     "${PROJECT_NAME}_NO_EXPORT"
    DEPRECATED_MACRO_NAME    "${PROJECT_NAME}_DEPRECATED"
    NO_DEPRECATED_MACRO_NAME "${PROJECT_NAME}_NO_DEPRECATED"
    STATIC_DEFINE            "${PROJECT_NAME}_STATIC_DEFINE"
    EXPORT_FILE_NAME         "${BINARY_INCLUDE_DIR}/${PROJECT_PACKAGE_NAME_L}/${PROJECT_NAME}Export.h"
  )

fooyin/fooyin cmake/FooyinMacrosInternal.cmake :37

generate_export_header(
        ${name}
        BASE_NAME
        fy${base_name}
        EXPORT_FILE_NAME
        ${CMAKE_CURRENT_BINARY_DIR}/fy${base_name}_export.h
    )

qt/qtbase tests/auto/cmake/test_interface_link_libraries/CMakeLists.txt :17

generate_export_header(somelib)

KDE/plasma-workspace components/batterycontrol/CMakeLists.txt :21

generate_export_header(batterycontrol)

polycube-network/polycube src/libs/prometheus-cpp/core/CMakeLists.txt :40

generate_export_header(core
  BASE_NAME ${PROJECT_NAME}-core
  EXPORT_FILE_NAME include/prometheus/detail/core_export.h
)

dfleury2/beauty src/CMakeLists.txt :59

generate_export_header(beauty EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/src/beauty/export.hpp)

Dreamtowards/Ethertia lib/_misc/nbt/CMakeLists.txt :48

generate_export_header(nbt++ BASE_NAME nbt)

zeromq/zmqpp CMakeLists.txt :150

generate_export_header(zmqpp)

NVIDIA/VideoProcessingFramework src/TC/CMakeLists.txt :78

generate_export_header(TC)

InsightSoftwareConsortium/ITK CMake/ITKModuleMacros.cmake :263

generate_export_header(
        ${itk-module}
        EXPORT_FILE_NAME ${_export_header_file}
        EXPORT_MACRO_NAME ${itk-module}_EXPORT
        NO_EXPORT_MACRO_NAME ${itk-module}_HIDDEN
        STATIC_DEFINE ITK_STATIC
      )

ComputationalBiomechanicsLab/opensim-creator third_party/SDL/cmake/test/CMakeLists.txt :70

generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)

KratosMultiphysics/Kratos applications/CoSimulationApplication/custom_external_libraries/CoSimIO/CMakeLists.txt :147

generate_export_header( co_sim_io EXPORT_MACRO_NAME CO_SIM_IO_API EXPORT_FILE_NAME
                        ${CMAKE_CURRENT_SOURCE_DIR}/co_sim_io/includes/co_sim_io_api.hpp )

cutelyst/cutelyst Cutelyst/CMakeLists.txt :106

generate_export_header(${target_name} BASE_NAME CUTELYST)

logicalclocks/rondb extra/libcbor/libcbor-0.11.0/src/CMakeLists.txt :21

generate_export_header(cbor EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/cbor/cbor_export.h)

KDE/marble src/lib/astro/CMakeLists.txt :32

generate_export_header(astro BASE_NAME astrolib)

famez/J1939-Framework CMakeLists.txt :59

generate_export_header(J1939)

ClickHouse/ClickHouse contrib/mongo-cxx-driver-cmake/CMakeLists.txt :52

generate_export_header(_bsoncxx
        BASE_NAME BSONCXX
        EXPORT_MACRO_NAME BSONCXX_API
        NO_EXPORT_MACRO_NAME BSONCXX_PRIVATE
        EXPORT_FILE_NAME ${BSONCXX_BINARY_DIR}/lib/bsoncxx/v_noabi/bsoncxx/config/export.hpp
        STATIC_DEFINE BSONCXX_STATIC
)

jupp0r/prometheus-cpp core/CMakeLists.txt :52

generate_export_header(core
  BASE_NAME ${PROJECT_NAME}-core
  EXPORT_FILE_NAME include/prometheus/detail/core_export.h
)

pingcap/tiflash contrib/prometheus-cpp-cmake/core/CMakeLists.txt :40

generate_export_header(core
  BASE_NAME ${PROJECT_NAME}-core
  EXPORT_FILE_NAME include/prometheus/detail/core_export.h
)

shogun-toolbox/shogun src/shogun/CMakeLists.txt :126

generate_export_header(shogun)

ornladios/ADIOS2 examples/plugins/engine/CMakeLists.txt :19

generate_export_header(adios2_plugins_exampleWritePlugin BASE_NAME plugin_engine_write)

heal-research/operon CMakeLists.txt :189

generate_export_header(
    operon_operon
    BASE_NAME operon
    EXPORT_FILE_NAME export/operon/operon_export.hpp
    CUSTOM_CONTENT_FROM_VARIABLE pragma_suppress_c4251
)

mantidproject/mantid buildconfig/CMake/GenerateMantidExportHeader.cmake :37

generate_export_header(
    "${TARGET_LIBRARY}"
    BASE_NAME
    "MANTID_${TARGET_NAME}"
    PREFIX_NAME
    ""
    EXPORT_FILE_NAME
    "Mantid${TARGET_LIBRARY}/DllConfig.h"
    EXPORT_MACRO_NAME
    "MANTID_${TARGET_NAME}_DLL"
    DEPRECATED_MACRO_NAME
    "MANTID_${TARGET_NAME}_DEPRECATED"
    CUSTOM_CONTENT_FROM_VARIABLE
    CUSTOM
  )

symforce-org/symforce third_party/symengine/symengine/CMakeLists.txt :222

generate_export_header(symengine)

ossia/libossia src/ossia_setup.cmake :144

generate_export_header(ossia BASE_NAME OSSIA ALWAYS_EXPORT DLLIMPORT)

libjxl/libjxl lib/jxl.cmake :80

generate_export_header(jxl_export
  BASE_NAME JXL
  EXPORT_FILE_NAME include/jxl/jxl_export.h)

vxl/vxl config/cmake/config/vxl_utils.cmake :197

generate_export_header(${LSLHVP_TARGET_NAME}
       BASE_NAME ${LSLHVP_BASE_NAME}
       EXPORT_FILE_NAME ${LSLHVP_EXPORT_HEADER_FILE}
  )

luigifreda/slamplay thirdparty/ros/console_bridge/CMakeLists.txt :55

generate_export_header(${PROJECT_NAME}
    EXPORT_MACRO_NAME CONSOLE_BRIDGE_DLLAPI)

Jinmo/ifred palette/CMakeLists.txt :51

GENERATE_EXPORT_HEADER(palette)

saturneric/GpgFrontend cmake/LibraryRegistry.cmake :55

generate_export_header(${target_name} EXPORT_FILE_NAME "${export_file}")

mutable-org/mutable CMakeLists.txt :266

generate_export_header(
    ${PROJECT_NAME}
    BASE_NAME "M"
    EXPORT_FILE_NAME "${CMAKE_CURRENT_SOURCE_DIR}/include/mutable/mutable-config.hpp"
)

n4n0GH/hello window-decoration/libhellocommon/CMakeLists.txt :15

generate_export_header(hellocommon5
    BASE_NAME hellocommon
    EXPORT_FILE_NAME hellocommon_export.h)

liblogicalaccess/liblogicalaccess CMakeLists.txt :44

generate_export_header(${PROJECT_NAME}
            EXPORT_MACRO_NAME "${ARGV0}_API"
            EXPORT_FILE_NAME ${_EXPORT_FILE_PATH})

neka-nat/cupoch third_party/CMakeLists.txt :269

generate_export_header(console_bridge
    EXPORT_MACRO_NAME CONSOLE_BRIDGE_DLLAPI)

troldal/OpenXLSX OpenXLSX/CMakeLists.txt :201

generate_export_header(OpenXLSX
        BASE_NAME openxlsx
        EXPORT_FILE_NAME OpenXLSX-Exports.hpp
        EXPORT_MACRO_NAME OPENXLSX_EXPORT
        NO_EXPORT_MACRO_NAME OPENXLSX_HIDDEN)

LMMS/lmms cmake/modules/BuildPlugin.cmake :83

GENERATE_EXPORT_HEADER(${PLUGIN_NAME}
		BASE_NAME ${PLUGIN_EXPORT_BASE_NAME}
	)

cvet/fonline ThirdParty/SDL/cmake/test/CMakeLists.txt :70

generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)

karastojko/mailio CMakeLists.txt :149

generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME export.hpp)

facebook/mysql-5.6 extra/libcbor/src/CMakeLists.txt :11

generate_export_header(cbor EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/cbor/cbor_export.h)

polardb/polardbx-engine extra/libcbor/src/CMakeLists.txt :11

generate_export_header(cbor EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/cbor/cbor_export.h)

KDE/kstars kstars/CMakeLists.txt :1339

generate_export_header(KStarsLib)

OpenKinect/libfreenect2 CMakeLists.txt :427

GENERATE_EXPORT_HEADER(freenect2
  BASE_NAME libfreenect2
  EXPORT_FILE_NAME libfreenect2/export.h
)

zzag/plasma5-wallpapers-dynamic src/lib/CMakeLists.txt :44

generate_export_header(kdynamicwallpaper
    BASE_NAME KDynamicWallpaper
    EXPORT_MACRO_NAME KDYNAMICWALLPAPER_EXPORT
)

skmp/reicast-emulator CMakeLists.txt :284

GENERATE_EXPORT_HEADER (reicast
        BASE_NAME reicast
        EXPORT_MACRO_NAME reicast_EXPORT
        EXPORT_FILE_NAME reicast_Export.h
        STATIC_DEFINE reicast_BUILT_AS_STATIC
      )

tesseract-ocr/tesseract src/training/CMakeLists.txt :129

generate_export_header(common_training EXPORT_MACRO_NAME
                       TESS_COMMON_TRAINING_API)

gemrb/gemrb gemrb/core/CMakeLists.txt :180

GENERATE_EXPORT_HEADER(gemrb_core BASE_NAME GEM EXPORT_FILE_NAME ../includes/gem-core-export.h CUSTOM_CONTENT_FROM_VARIABLE EXTENDED_EXPORTS)

chemfiles/chemfiles CMakeLists.txt :192

generate_export_header(chemfiles
    BASE_NAME CHFL
    EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/chemfiles/exports.h
)