Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: build libmisc and libc4script statically
As reported by [1], some distributions use shared libraries as default preset in CMake. Without explicitely linking statically libmisc and libc4script, we have the following link issue: [...]/host/bin/x86_64-linux-g++ --sysroot=[...]sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -std=gnu++14 -Wall -Wextra -Wredundant-decls -Wendif-labels -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wsign-promo -Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -DNDEBUG -rdynamic CMakeFiles/c4group.dir/src/c4group/C4GroupMain.cpp.o -o c4group -Wl,-rpath,[...]/build/openclonk-7.0: liblibmisc.so -lz -lpthread -lrt liblibmisc.so : référence indéfinie vers « C4LangStringTable::Translate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const » liblibmisc.so : référence indéfinie vers « C4LangStringTable::system_string_table » [1] openclonk#26 While at it, build libopenclonk statically since libopenclonk is not installed by the CMake build system. Signed-off-by: Romain Naour <romain.naour@gmail.com>
- Loading branch information