Skip to content

Please add cmake examples #204

Description

@erichschroeter

I'm trying to use umockdev for some regression tests, but I am having a difficult time. Where is umockdev.h? I tried manually building with meson, thinking that would generate the header, but that still did not produce the header (at least anywhere find . -name umockdev.h would find it). Am I missing something obvious?

Documentation on how to include umockdev using CMake would be ideal. Something like:

FetchContent_Declare(
  umockdev
  GIT_REPOSITORY https://github.com/martinpitt/umockdev.git
  GIT_TAG        0.17.15 # or a later release
)
FetchContent_MakeAvailable(umockdev)
list(APPEND CMAKE_MODULE_PATH ${umockdev_SOURCE_DIR}/extras)


add_executable(battery battery.c)
target_include_directories(battery ${umockdev_INCLUDE_DIRECTORIES})
target_link_libraries(battery ${umockdev_LIBRARIES})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions