Skip to content

Commit

Permalink
Merge pull request #72 from compnerd/config
Browse files Browse the repository at this point in the history
build: add cmark-gfm-config to allow wiring up builds
  • Loading branch information
compnerd authored Jan 31, 2024
2 parents 9b50a73 + 7733c64 commit 2c47322
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ if(CMARK_FUZZ_QUADRATIC)
add_subdirectory(fuzz)
endif()

export(TARGETS libcmark-gfm libcmark-gfm-extensions
FILE cmark-gfmConfig.cmake)
include(CMakePackageConfigHelpers)
configure_package_config_file(cmark-gfm-config.cmake.in
${CMAKE_BINARY_DIR}/cmake/modules/cmark-gfm-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
install(FILES
${CMAKE_BINARY_DIR}/cmake/modules/cmark-gfm-config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)

3 changes: 3 additions & 0 deletions cmark-gfm-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@PACKAGE_INIT@
include(${CMAKE_CURRENT_LIST_DIR}/cmark-gfm/cmark-gfm.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cmark-gfm-extensions/cmark-gfm-extensions.cmake)
2 changes: 1 addition & 1 deletion extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ install(FILES
include/module.modulemap
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmark_gfm_extensions)
install(EXPORT cmark-gfm-extensions
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake-gfm-extensions)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cmark-gfm-extensions)
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ install(FILES
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark-gfm.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(EXPORT cmark-gfm
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cmark-gfm)

export(TARGETS libcmark-gfm
FILE ${CMAKE_CURRENT_BINARY_DIR}/cmarkTargets.cmake)

0 comments on commit 2c47322

Please sign in to comment.