397bb5d18a6fa5c37cf999339959efa1f58080c3 introduced a bug by using CMAKE_PROJECT_VERSION. While a valid variable, to quote the documentation,
This variable holds the version of the project as specified in the top level CMakeLists.txt file by a project() command
This is a problem if using IXWebSocket as a submodule, as IXWebSocket is no longer the top-level project in this scenario. Best-case, the version for the resulting shared library is wrong. Worst-case, which happened to a project of mine, no version is defined, and everything explodes. Because the variable is then interpreted to be empty, a set_target_properties call explodes, because it thinks it's missing an argument:
CMake Error at build/_deps/ixwebsocket-src/CMakeLists.txt:171 (set_target_properties):
set_target_properties called with incorrect number of arguments.
The correct variable to use is PROJECT_VERSION, which returns the VERSION option for the last project command, i.e. the one defined by IXWebSocket
397bb5d18a6fa5c37cf999339959efa1f58080c3 introduced a bug by using
CMAKE_PROJECT_VERSION
. While a valid variable, to quote the documentation,This is a problem if using IXWebSocket as a submodule, as IXWebSocket is no longer the top-level project in this scenario. Best-case, the version for the resulting shared library is wrong. Worst-case, which happened to a project of mine, no version is defined, and everything explodes. Because the variable is then interpreted to be empty, a
set_target_properties
call explodes, because it thinks it's missing an argument:The correct variable to use is
PROJECT_VERSION
, which returns the VERSION option for the last project command, i.e. the one defined by IXWebSocket