Skip to content

Commit

Permalink
Rename option BUILD_STATIC_LIBRARY to WITH_STATIC_LIBRARIES
Browse files Browse the repository at this point in the history
to conform to the bare Makefiles

Signed-off-by: Lance Chen <[email protected]>
  • Loading branch information
lancechentw committed Jun 2, 2016
1 parent f18e8e1 commit 97847fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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)
Expand All @@ -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})

Expand Down
4 changes: 2 additions & 2 deletions lib/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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})

Expand Down

0 comments on commit 97847fa

Please sign in to comment.