Some CPACK variables are set even when the PAHO_ENABLE_CPACK option is turned off. This is a problem when the CMake project is included into another CMake project (as a sub-project).
To Reproduce
- Include paho-mqtt in another CMake project.
- set(PAHO_ENABLE_CPACK OFF)
- CPACK variables, for example CPACK_GENERATOR, are set/overridden by paho-mqtt.
Expected behavior
CPACK variables are not set when PAHO_ENABLE_CPACK is turned off.
Environment (please complete the following information):
Possible solution
This can probably be fixed by wrapping the CPACK parts with an if (PAHO_ENABLE_CPACK) in the files:
- CMakeLists.txt
- externals/paho-mqtt-c/CMakeLists.txt
Some CPACK variables are set even when the PAHO_ENABLE_CPACK option is turned off. This is a problem when the CMake project is included into another CMake project (as a sub-project).
To Reproduce
Expected behavior
CPACK variables are not set when PAHO_ENABLE_CPACK is turned off.
Environment (please complete the following information):
Possible solution
This can probably be fixed by wrapping the CPACK parts with an
if (PAHO_ENABLE_CPACK)in the files: