diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-25 17:50:54 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-03-25 18:13:54 +0100 |
commit | 9ff5cc74f2b28fa0bc9987d14d8464243462cf42 (patch) | |
tree | 53b24905fb77ccd0e0c4ac421f8a4438665da956 /testing/mtex2mml/cmake-fix-install.patch | |
parent | d7c1296121b59b476ec6c519800ac31782a5f192 (diff) |
testing/mtex2mml: new aport
https://github.com/gjtorikian/mtex2MML
A Bison grammar to convert TeX math into MathML
Diffstat (limited to 'testing/mtex2mml/cmake-fix-install.patch')
-rw-r--r-- | testing/mtex2mml/cmake-fix-install.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/mtex2mml/cmake-fix-install.patch b/testing/mtex2mml/cmake-fix-install.patch new file mode 100644 index 00000000000..48e59abf6ab --- /dev/null +++ b/testing/mtex2mml/cmake-fix-install.patch @@ -0,0 +1,51 @@ +From 5169eaf0eefd635f18a04e4d403e6beb97c5b679 Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Fri, 24 Mar 2017 20:39:23 +0100 +Subject: [PATCH] Fix cmake rules to install executable, libraries and headers + +I should note that I don't have much experience with CMake, so I'm not +sure if this solution is _correct_. However, it works as expected. + +Fixes #58 + +Upstream-Issue: https://github.com/gjtorikian/mtex2MML/pull/60 +--- + CMakeLists.txt | 7 ++++++- + src/libmtex2MML.pc.in | 2 +- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a19eab4..f4d6bcc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,7 +42,7 @@ set(MTEX2MML_VERSION_STRING "${MTEX2MML_VERSION_MAJOR}.${MTEX2MML_VERSION_MINOR} + # + set(BIN_INSTALL_DIR bin CACHE PATH "Where to install binaries to.") + set(LIB_INSTALL_DIR lib CACHE PATH "Where to install libraries to.") +-set(INCLUDE_INSTALL_DIR include CACHE PATH "Where to install headers to.") ++set(INCLUDE_INSTALL_DIR include/${PROJECT_NAME} CACHE PATH "Where to install headers to.") + + # + # +@@ -107,6 +107,11 @@ add_library(${STATICLIBRARY} STATIC + ) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/libmtex2MML.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libmtex2MML.pc @ONLY) ++ ++install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${BIN_INSTALL_DIR}) ++install(TARGETS ${LIBRARY} LIBRARY DESTINATION ${LIB_INSTALL_DIR}) ++install(TARGETS ${STATICLIBRARY} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) ++install(FILES ${SRC_H} DESTINATION ${INCLUDE_INSTALL_DIR}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmtex2MML.pc + DESTINATION lib/pkgconfig) + +diff --git a/src/libmtex2MML.pc.in b/src/libmtex2MML.pc.in +index 0bc2557..b49c75f 100644 +--- a/src/libmtex2MML.pc.in ++++ b/src/libmtex2MML.pc.in +@@ -7,4 +7,4 @@ Name: libmtex2MML + Description: A Bison grammar to convert TeX math into MathML. + Version: @PROJECT_VERSION@ + Libs: -L${libdir} -lmtex2MML +-Cflags: -I${includedir} ++Cflags: -I${includedir}/mtex2MML |