2021-09-16 05:12:57 +08:00
|
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
2024-09-26 07:44:12 -07:00
|
|
|
index 523b2cb..fac823e 100644
|
2021-09-16 05:12:57 +08:00
|
|
|
--- a/src/CMakeLists.txt
|
|
|
|
+++ b/src/CMakeLists.txt
|
2024-09-26 07:44:12 -07:00
|
|
|
@@ -51,6 +51,7 @@ generate_export_header(cmark
|
|
|
|
# path for OSS Fuzz.
|
|
|
|
add_custom_target(cmark_static DEPENDS cmark)
|
2021-09-16 05:12:57 +08:00
|
|
|
|
|
|
|
+if (BUILD_TOOLS)
|
2024-09-26 07:44:12 -07:00
|
|
|
add_executable(cmark_exe
|
|
|
|
main.c)
|
|
|
|
cmark_add_compile_options(cmark_exe)
|
|
|
|
@@ -59,14 +60,22 @@ set_target_properties(cmark_exe PROPERTIES
|
|
|
|
INSTALL_RPATH "${Base_rpath}")
|
|
|
|
target_link_libraries(cmark_exe PRIVATE
|
|
|
|
cmark)
|
2021-09-16 05:12:57 +08:00
|
|
|
+endif()
|
|
|
|
|
2024-09-26 07:44:12 -07:00
|
|
|
-install(TARGETS cmark_exe cmark
|
|
|
|
+install(TARGETS cmark
|
2021-09-16 05:12:57 +08:00
|
|
|
EXPORT cmark-targets
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
+if (BUILD_TOOLS)
|
2024-09-26 07:44:12 -07:00
|
|
|
+ install(TARGETS cmark_exe
|
2021-09-16 05:12:57 +08:00
|
|
|
+ EXPORT cmark-targets
|
|
|
|
+ RUNTIME DESTINATION tools/cmark
|
|
|
|
+ )
|
|
|
|
+endif()
|
|
|
|
+
|
2024-09-26 07:44:12 -07:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
|
|
|
|