Currently, CMake builds library targets for IQmol, which means that if -DBUILD_SHARED_LIBS:BOOL=ON the libraries will be built as shared libraries. This does not sound correct; from the use it looks like the library targets are just used to collect the various sources that should get linked into the final binary. This means that one should specify OBJECT in the add_library() commands, see https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#object-libraries
Currently, CMake builds library targets for IQmol, which means that if
-DBUILD_SHARED_LIBS:BOOL=ON
the libraries will be built as shared libraries. This does not sound correct; from the use it looks like the library targets are just used to collect the various sources that should get linked into the final binary. This means that one should specifyOBJECT
in theadd_library()
commands, see https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#object-libraries