Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake cannot find cmark #307

Closed
soyflourbread opened this issue Jul 19, 2019 · 4 comments
Closed

CMake cannot find cmark #307

soyflourbread opened this issue Jul 19, 2019 · 4 comments

Comments

@soyflourbread
Copy link

find_package(cmark) is not working even though cmark is installed correctly and cmark claims to have CMake's find_package() support.

Log:

CMake Error at CMakeLists.txt:89 (find_package):
  By not providing "Findcmark.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "cmark", but
  CMake did not find one.

  Could not find a package configuration file provided by "cmark" with any of
  the following names:

    cmarkConfig.cmake
    cmark-config.cmake

  Add the installation prefix of "cmark" to CMAKE_PREFIX_PATH or set
  "cmark_DIR" to a directory containing one of the above files.  If "cmark"
  provides a separate development package or SDK, be sure it has been
  installed.

Apparantly cmark installs its .cmake file in $libdir/cmake/cmark.cmake, but CMake expects cmarkConfig.cmake.

@jgm
Copy link
Member

jgm commented Jul 19, 2019

I am not sure what part of the build is creating this file...nothing I can see in CMakeLists.txt or src/CMakeLists.txt seems to refer to it. As far as I can see, we aren't overriding any defaults.
If you want to make a suggestion as to how to change our CMakeLists.txt, I'm all ears.

@nwellnhof
Copy link
Contributor

cmark claims to have CMake's find_package() support.

Where did you find this claim?

@soyflourbread
Copy link
Author

Ok I'll try creating a PR.

compnerd added a commit to compnerd/swift-cmark that referenced this issue Dec 22, 2019
This enables the use of the export targets from the build tree to allow
easy use of the CMark library in other projects.

Resolves: commonmark#307
@compnerd
Copy link
Contributor

#320 should enable the use of find_package at least for the build tree case, I think that there is a little bit of work left to enable the use of it in the install tree. That work will amount largely to renaming the export file and installing the cmarkConfig.cmake.

compnerd added a commit to compnerd/swift-cmark that referenced this issue Dec 22, 2019
This enables the use of the export targets from the build tree to allow
easy use of the CMark library in other projects.

Resolves: commonmark#307
compnerd added a commit to compnerd/swift-cmark that referenced this issue Dec 22, 2019
This enables the use of the export targets from the build tree to allow
easy use of the CMark library in other projects.

Resolves: commonmark#307
@jgm jgm closed this as completed in 1ff180e Jan 3, 2020
QuietMisdreavus pushed a commit to apple/swift-cmark that referenced this issue Apr 6, 2023
fix: Links with unique targets should have unique labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants