-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
1 parent
196c31d
commit 0940cf5
Showing
6 changed files
with
48 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,25 +8,21 @@ | |
# Contact KDAB at <[email protected]> for commercial licensing options. | ||
# | ||
|
||
find_file(MOSQUITTO_HEADER | ||
NAMES | ||
mosquitto.h | ||
PATHS | ||
/usr/include | ||
/usr/local/include | ||
/usr/local/opt/mosquitto/include | ||
$ENV{PROGRAMFILES}/mosquitto/devel | ||
$ENV{PROGRAMFILES\(X86\)}/mosquitto/devel | ||
find_file( | ||
MOSQUITTO_HEADER | ||
NAMES mosquitto.h | ||
PATHS /usr/include | ||
/usr/local/include | ||
/usr/local/opt/mosquitto/include | ||
$ENV{PROGRAMFILES}/mosquitto/devel | ||
$ENV{PROGRAMFILES\(X86\)}/mosquitto/devel | ||
) | ||
|
||
if(APPLE OR UNIX) | ||
find_library(MOSQUITTO_LIBRARY | ||
NAMES | ||
mosquitto | ||
PATHS | ||
/usr/lib | ||
/usr/local/lib | ||
/usr/local/opt/mosquitto/lib | ||
find_library( | ||
MOSQUITTO_LIBRARY | ||
NAMES mosquitto | ||
PATHS /usr/lib /usr/local/lib /usr/local/opt/mosquitto/lib | ||
) | ||
|
||
if(MOSQUITTO_HEADER AND MOSQUITTO_LIBRARY) | ||
|
@@ -35,28 +31,24 @@ if(APPLE OR UNIX) | |
endif() | ||
|
||
if(WIN32) | ||
find_file(MOSQUITTO_DLL | ||
NAMES | ||
mosquitto.dll | ||
PATHS | ||
$ENV{PROGRAMFILES}/mosquitto | ||
$ENV{PROGRAMFILES\(X86\)}/mosquitto | ||
find_file( | ||
MOSQUITTO_DLL | ||
NAMES mosquitto.dll | ||
PATHS $ENV{PROGRAMFILES}/mosquitto $ENV{PROGRAMFILES\(X86\)}/mosquitto | ||
) | ||
|
||
find_library(MOSQUITTO_LIBRARY | ||
NAMES | ||
mosquitto | ||
PATHS | ||
$ENV{PROGRAMFILES}/mosquitto/devel | ||
$ENV{PROGRAMFILES\(X86\)}/mosquitto/devel | ||
find_library( | ||
MOSQUITTO_LIBRARY | ||
NAMES mosquitto | ||
PATHS $ENV{PROGRAMFILES}/mosquitto/devel $ENV{PROGRAMFILES\(X86\)}/mosquitto/devel | ||
) | ||
|
||
file(GLOB MOSQUITTO_RUNTIME_DLLS | ||
"$ENV{PROGRAMFILES}/mosquitto/*.dll" | ||
"$ENV{PROGRAMFILES\(X86\)}/mosquitto/*.dll" | ||
) | ||
file(GLOB MOSQUITTO_RUNTIME_DLLS "$ENV{PROGRAMFILES}/mosquitto/*.dll" "$ENV{PROGRAMFILES\(X86\)}/mosquitto/*.dll") | ||
|
||
if(MOSQUITTO_HEADER AND MOSQUITTO_DLL AND MOSQUITTO_LIBRARY) | ||
if(MOSQUITTO_HEADER | ||
AND MOSQUITTO_DLL | ||
AND MOSQUITTO_LIBRARY | ||
) | ||
set(Mosquitto_FOUND TRUE) | ||
endif() | ||
endif() | ||
|
@@ -67,18 +59,19 @@ if(Mosquitto_FOUND) | |
add_library(Mosquitto::Mosquitto SHARED IMPORTED) | ||
|
||
if(APPLE OR UNIX) | ||
set_target_properties(Mosquitto::Mosquitto PROPERTIES | ||
IMPORTED_LOCATION "${MOSQUITTO_LIBRARY}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${MOSQUITTO_INCLUDE_DIRECTORY}" | ||
set_target_properties( | ||
Mosquitto::Mosquitto PROPERTIES IMPORTED_LOCATION "${MOSQUITTO_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES | ||
"${MOSQUITTO_INCLUDE_DIRECTORY}" | ||
) | ||
endif() | ||
|
||
if(WIN32) | ||
set_target_properties(Mosquitto::Mosquitto PROPERTIES | ||
IMPORTED_IMPLIB "${MOSQUITTO_LIBRARY}" | ||
IMPORTED_LOCATION "${MOSQUITTO_DLL}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${MOSQUITTO_INCLUDE_DIRECTORY}" | ||
) | ||
set_target_properties( | ||
Mosquitto::Mosquitto | ||
PROPERTIES IMPORTED_IMPLIB "${MOSQUITTO_LIBRARY}" | ||
IMPORTED_LOCATION "${MOSQUITTO_DLL}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${MOSQUITTO_INCLUDE_DIRECTORY}" | ||
) | ||
endif() | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,9 @@ | |
# Contact KDAB at <[email protected]> for commercial licensing options. | ||
# | ||
|
||
set(SOURCES | ||
mqtt.cpp | ||
) | ||
set(SOURCES mqtt.cpp) | ||
|
||
set(HEADERS | ||
mosquitto_wrapper.h | ||
mqtt.h | ||
) | ||
set(HEADERS mosquitto_wrapper.h mqtt.h) | ||
|
||
add_library( | ||
KDMqtt | ||
|
@@ -50,9 +45,7 @@ target_link_libraries( | |
) | ||
|
||
generate_export_header(KDMqtt BASE_NAME kdmqtt) | ||
configure_file( | ||
${CMAKE_CURRENT_BINARY_DIR}/kdmqtt_export.h ${CMAKE_BINARY_DIR}/include/KDMqtt/kdmqtt_export.h | ||
) | ||
configure_file(${CMAKE_CURRENT_BINARY_DIR}/kdmqtt_export.h ${CMAKE_BINARY_DIR}/include/KDMqtt/kdmqtt_export.h) | ||
# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h ${CMAKE_BINARY_DIR}/include/KDMqtt/config.h) | ||
install( | ||
FILES ${CMAKE_CURRENT_BINARY_DIR}/kdmqtt_export.h | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -233,4 +233,4 @@ class MosquittoClient | |
struct mosquitto *m_clientInstance; | ||
}; | ||
|
||
} | ||
} // namespace KDMqtt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters