Skip to content

Commit

Permalink
Fix string quoting in CMakeLists.txt. Closes #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Mar 13, 2016
1 parent 35c4d3d commit 69a08ab
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Expand Up @@ -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
Expand Down Expand Up @@ -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}")
4 changes: 4 additions & 0 deletions ChangeLog.txt
Expand Up @@ -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
================

Expand Down
8 changes: 4 additions & 4 deletions client/CMakeLists.txt
Expand Up @@ -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}")
4 changes: 2 additions & 2 deletions lib/CMakeLists.txt
Expand Up @@ -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)")
Expand Down
4 changes: 2 additions & 2 deletions lib/cpp/CMakeLists.txt
Expand Up @@ -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)")
Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit 69a08ab

Please sign in to comment.