From 97847fa95b91d5b5ddfae7508ed2f1f8ece28dce Mon Sep 17 00:00:00 2001 From: Lance Chen Date: Fri, 3 Jun 2016 01:53:58 +0800 Subject: [PATCH] Rename option BUILD_STATIC_LIBRARY to WITH_STATIC_LIBRARIES to conform to the bare Makefiles Signed-off-by: Lance Chen --- lib/CMakeLists.txt | 6 +++--- lib/cpp/CMakeLists.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 1290f998..c7c2f53f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -option(BUILD_STATIC_LIBRARY "Build the static library?" ON) +option(WITH_STATIC_LIBRARIES "Build the static libraries?" ON) option(WITH_PIC "Build the static library with PIC(Position Independent Code) enabled archives?" OFF) add_subdirectory(cpp) @@ -98,7 +98,7 @@ set_target_properties(libmosquitto PROPERTIES install(TARGETS libmosquitto RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) -if (${BUILD_STATIC_LIBRARY} STREQUAL ON) +if (${WITH_STATIC_LIBRARIES} STREQUAL ON) if (${WITH_PIC} STREQUAL OFF) add_library(libmosquitto_static STATIC ${C_SRC}) else (${WITH_PIC} STREQUAL OFF) @@ -114,7 +114,7 @@ if (${BUILD_STATIC_LIBRARY} STREQUAL ON) target_compile_definitions(libmosquitto_static PUBLIC "LIBMOSQUITTO_STATIC") install(TARGETS libmosquitto_static RUNTIME DESTINATION ${BINDIR} ARCHIVE DESTINATION ${LIBDIR}) -endif (${BUILD_STATIC_LIBRARY} STREQUAL ON) +endif (${WITH_STATIC_LIBRARIES} STREQUAL ON) install(FILES mosquitto.h DESTINATION ${INCLUDEDIR}) diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt index 2b9f3eb9..91adc3fa 100644 --- a/lib/cpp/CMakeLists.txt +++ b/lib/cpp/CMakeLists.txt @@ -18,7 +18,7 @@ set_target_properties(mosquittopp PROPERTIES ) install(TARGETS mosquittopp RUNTIME DESTINATION ${BINDIR} LIBRARY DESTINATION ${LIBDIR}) -if (${BUILD_STATIC_LIBRARY} STREQUAL ON) +if (${WITH_STATIC_LIBRARIES} STREQUAL ON) if (${WITH_PIC} STREQUAL OFF) add_library(mosquittopp_static STATIC $ @@ -40,7 +40,7 @@ if (${BUILD_STATIC_LIBRARY} STREQUAL ON) target_compile_definitions(mosquittopp_static PUBLIC "LIBMOSQUITTO_STATIC") install(TARGETS mosquittopp_static RUNTIME DESTINATION ${BINDIR} ARCHIVE DESTINATION ${LIBDIR}) -endif (${BUILD_STATIC_LIBRARY} STREQUAL ON) +endif (${WITH_STATIC_LIBRARIES} STREQUAL ON) install(FILES mosquittopp.h DESTINATION ${INCLUDEDIR})