From 69a08ab90520f4d1fc93aa11165ac829bebed8fa Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Sun, 13 Mar 2016 20:33:08 +0000 Subject: [PATCH] Fix string quoting in CMakeLists.txt. Closes #4. --- CMakeLists.txt | 12 ++++++------ ChangeLog.txt | 4 ++++ client/CMakeLists.txt | 8 ++++---- lib/CMakeLists.txt | 4 ++-- lib/cpp/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 8 ++++---- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4d148ac..18909ba1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,18 +37,18 @@ if (WIN32) else (WIN32) set (BINDIR bin) set (SBINDIR sbin) - if (${CMAKE_INSTALL_PREFIX} STREQUAL /usr) + if ("${CMAKE_INSTALL_PREFIX}" STREQUAL /usr) set (SYSCONFDIR /etc/mosquitto) - else (${CMAKE_INSTALL_PREFIX} STREQUAL /usr) + else ("${CMAKE_INSTALL_PREFIX}" STREQUAL /usr) set (SYSCONFDIR etc/mosquitto) - endif (${CMAKE_INSTALL_PREFIX} STREQUAL /usr) + endif ("${CMAKE_INSTALL_PREFIX}" STREQUAL /usr) set (LIBDIR lib${LIB_SUFFIX}) set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}") set (INCLUDEDIR include) set (DATAROOTDIR share) - set (MANDIR ${DATAROOTDIR}/man) - set (SHAREDIR ${DATAROOTDIR}/mosquitto) + set (MANDIR "${DATAROOTDIR}/man") + set (SHAREDIR "${DATAROOTDIR}/mosquitto") endif (WIN32) option(WITH_TLS @@ -92,4 +92,4 @@ add_subdirectory(man) # Install config file # ======================================== -install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION ${SYSCONFDIR}) +install(FILES mosquitto.conf aclfile.example pskfile.example pwfile.example DESTINATION "${SYSCONFDIR}") diff --git a/ChangeLog.txt b/ChangeLog.txt index 17a43d0f..489d2999 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -18,6 +18,10 @@ Client library: Clients: - Handle some unchecked malloc() calls. Closes #1. +Build: +- Fix string quoting in CMakeLists.txt. Closes #4. + + 1.4.8 - 20160214 ================ diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index a743fccf..2a617908 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -8,11 +8,11 @@ if (${WITH_SRV} STREQUAL ON) add_definitions("-DWITH_SRV") endif (${WITH_SRV} STREQUAL ON) -add_executable(mosquitto_pub pub_client.c ${shared_src}) -add_executable(mosquitto_sub sub_client.c ${shared_src}) +add_executable(mosquitto_pub pub_client.c "${shared_src}") +add_executable(mosquitto_sub sub_client.c "${shared_src}") target_link_libraries(mosquitto_pub libmosquitto) target_link_libraries(mosquitto_sub libmosquitto) -install(TARGETS mosquitto_pub RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) -install(TARGETS mosquitto_sub RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) +install(TARGETS mosquitto_pub RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") +install(TARGETS mosquitto_sub RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 32a04b4d..d9163991 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -70,8 +70,8 @@ set_target_properties(libmosquitto PROPERTIES SOVERSION 1 ) -install(TARGETS libmosquitto RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) -install(FILES mosquitto.h DESTINATION ${INCLUDEDIR}) +install(TARGETS libmosquitto RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") +install(FILES mosquitto.h DESTINATION "${INCLUDEDIR}") if (UNIX) install(CODE "EXEC_PROGRAM(/sbin/ldconfig)") diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt index 0a9fd914..b80dc181 100644 --- a/lib/cpp/CMakeLists.txt +++ b/lib/cpp/CMakeLists.txt @@ -10,8 +10,8 @@ set_target_properties(mosquittopp PROPERTIES VERSION ${VERSION} SOVERSION 1 ) -install(TARGETS mosquittopp RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) -install(FILES mosquittopp.h DESTINATION ${INCLUDEDIR}) +install(TARGETS mosquittopp RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") +install(FILES mosquittopp.h DESTINATION "${INCLUDEDIR}") if (UNIX) install(CODE "EXEC_PROGRAM(/sbin/ldconfig)") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5bebeedd..0008e555 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -117,13 +117,13 @@ if (UNIX) endif (APPLE) endif (UNIX) -install(TARGETS mosquitto RUNTIME DESTINATION ${SBINDIR} LIBRARY DESTINATION ${LIBDIR}) -install(FILES mosquitto_plugin.h DESTINATION ${INCLUDEDIR}) +install(TARGETS mosquitto RUNTIME DESTINATION "${SBINDIR}" LIBRARY DESTINATION "${LIBDIR}") +install(FILES mosquitto_plugin.h DESTINATION "${INCLUDEDIR}") if (${WITH_TLS} STREQUAL ON) add_executable(mosquitto_passwd mosquitto_passwd.c) - target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) - install(TARGETS mosquitto_passwd RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) + target_link_libraries(mosquitto_passwd "${OPENSSL_LIBRARIES}") + install(TARGETS mosquitto_passwd RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") endif (${WITH_TLS} STREQUAL ON) if (UNIX)