Skip to content

Commit 7733c64

Browse files
committed
build: add cmark-gfm-config to allow wiring up builds
Enable wiring up builds with the staged image of cmark. The unified build no longer tries to use custom build handling and instead prefers the standard CMake usage.
1 parent 9b50a73 commit 7733c64

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ if(CMARK_FUZZ_QUADRATIC)
109109
add_subdirectory(fuzz)
110110
endif()
111111

112-
export(TARGETS libcmark-gfm libcmark-gfm-extensions
113-
FILE cmark-gfmConfig.cmake)
112+
include(CMakePackageConfigHelpers)
113+
configure_package_config_file(cmark-gfm-config.cmake.in
114+
${CMAKE_BINARY_DIR}/cmake/modules/cmark-gfm-config.cmake
115+
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
116+
install(FILES
117+
${CMAKE_BINARY_DIR}/cmake/modules/cmark-gfm-config.cmake
118+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
114119

cmark-gfm-config.cmake.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@PACKAGE_INIT@
2+
include(${CMAKE_CURRENT_LIST_DIR}/cmark-gfm/cmark-gfm.cmake)
3+
include(${CMAKE_CURRENT_LIST_DIR}/cmark-gfm-extensions/cmark-gfm-extensions.cmake)

extensions/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ install(FILES
3333
include/module.modulemap
3434
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cmark_gfm_extensions)
3535
install(EXPORT cmark-gfm-extensions
36-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake-gfm-extensions)
36+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cmark-gfm-extensions)

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ install(FILES
9090
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark-gfm.pc
9191
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
9292
install(EXPORT cmark-gfm
93-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
93+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cmark-gfm)
9494

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

0 commit comments

Comments
 (0)