Closed Ghabry closed 6 years ago
Static linking sucks ^^
Works now with:
cmake -DCMAKE_PREFIX_PATH="$HOME/workspace/toolchain-linux-static/linux-static;
$HOME/workspace/liblcf-linux/build" -DCMAKE_INSTALL_PREFIX="/tmp/test" .
While working on Player CMakeLists yesterday I noticed that my adding of "/EHsc" is wrong. The problem is somewhere else:
I used -DCMAKE_CXX_FLAGS_DEBUG and -DCMAKE_CXX_FLAGS_RELEASE to overwrite the runtime used (static runtime /MTd) because CMake still provides no way official way to do this (CMake pls) but settings these arguments overwrote the default settings, including /EHsc m(.
Looks like the better solution will be to drop a slightly modified version of this macro in the Modules folder https://stackoverflow.com/questions/10113017/ . Then I can use -DMSVC_RUNTIME=static
Okay, looks good to me.
lacks Windows test