Rename option BUILD_STATIC_LIBRARY to WITH_STATIC_LIBRARIES

to conform to the bare Makefiles

Signed-off-by: Lance Chen <cyen0312@gmail.com>
This commit is contained in:
Lance Chen 2016-06-03 01:53:58 +08:00
parent f18e8e12a8
commit 97847fa95b
No known key found for this signature in database
GPG Key ID: 2B9B29056A82FEB1
2 changed files with 5 additions and 5 deletions

View File

@ -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})

View File

@ -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
$<TARGET_OBJECTS:libmosquitto_obj>
@ -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})