Created
January 18, 2011 02:33
-
-
Save adamvr/783895 to your computer and use it in GitHub Desktop.
This patch modifies the cmakelists of mosquitto-0.9.1 to facilitate the installation of mosquitto's man pages and python module using cmake.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Corrects brace types in lib/CMakeLists.txt | |
# Adds python module installation | |
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | |
index 915fcac..957c2e5 100644 | |
--- a/lib/CMakeLists.txt | |
+++ b/lib/CMakeLists.txt | |
@@ -1,4 +1,5 @@ | |
add_subdirectory(cpp) | |
+add_subdirectory(python) | |
include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib | |
${STDBOOL_H_PATH} ${STDINT_H_PATH}) | |
diff --git a/lib/python/CMakeLists.txt b/lib/python/CMakeLists.txt | |
new file mode 100644 | |
index 0000000..bc1e1c1 | |
--- /dev/null | |
+++ b/lib/python/CMakeLists.txt | |
@@ -0,0 +1,10 @@ | |
+install(CODE | |
+ "EXECUTE_PROCESS( | |
+ COMMAND python ./setup.py install --prefix=${CMAKE_INSTALL_PREFIX} | |
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/lib/python | |
+ ) | |
+ EXECUTE_PROCESS( | |
+ COMMAND python ./setup.py clean --all | |
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/lib/python | |
+ ) | |
+") | |
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt | |
index af20a59..89fb780 100644 | |
--- a/man/CMakeLists.txt | |
+++ b/man/CMakeLists.txt | |
@@ -1,6 +1,5 @@ | |
-install(FILES mosquitto_pub.1 mosquitto_sub.1 DESTINATION $(MANDEST)/man1) | |
-install(FILES libmosquitto.3 DESTINATION $(MANDEST)/man3) | |
-install(FILES mosquitto.conf.5 DESTINATION $(MANDEST)/man5) | |
-install(FILES mqtt.7 DESTINATION $(MANDEST)/man7) | |
-install(FILES mosquitto.8 DESTINATION $(MANDEST)/man8) | |
- | |
+install(FILES mosquitto_pub.1 mosquitto_sub.1 DESTINATION ${MANDEST}/man1) | |
+install(FILES libmosquitto.3 DESTINATION ${MANDEST}/man3) | |
+install(FILES mosquitto.conf.5 DESTINATION ${MANDEST}/man5) | |
+install(FILES mqtt.7 DESTINATION ${MANDEST}/man7) | |
+install(FILES mosquitto.8 DESTINATION ${MANDEST}/man8) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment