-
-
Notifications
You must be signed in to change notification settings - Fork 543
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 fixes #137
CMake fixes #137
Conversation
This allows using them in other cmake projects.
@@ -29,3 +29,6 @@ if(NOT CMAKE_BUILD_TYPE) | |||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING | |||
"Choose the type of build, options are: Debug Profile Release Asan Ubsan." FORCE) | |||
endif(NOT CMAKE_BUILD_TYPE) | |||
|
|||
# export targets | |||
install(EXPORT cmark DESTINATION lib/cmake) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really supposed to be lib/cmake
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note the comment at line 49 of src/CMakeLists.txt.
CMake has a couple of places where it searches for config files generated by the install(EXPORT) command. /lib/cmake is one of them, useful if your project doesn't add its own subfolder for the libraries (like this here does). I can change that to ${LIB_INSTALL_DIR}/cmake, didn't see the comment. |
When is this PR going to be merged? |
I'm just worried about assuming that the build machine will always have a Is that universally true, even on Windows e.g.? |
The common CMake convention is that you install and export libraries under And the documentation for find_package() lists |
OK, I've merged now! |
Thanks! If you run into any CMake issues related to that, I'll be happy to help. |
…red (commonmark#137) fdopen, strdup and others are not declared by glibc header files unless _DEFAULT_SOURCE is defined. Signed-off-by: Keith Packard <keithp@keithp.com>
Just two fixes to use the library better as CMake subproject (
add_subdirectory()
).find_package()
and allows linking the cmark targets to your own targets if your own targets are installed.