Closed ghost closed 5 years ago
but why?
I wasn't aware of _CMAKE_TOOLCHAIN_PREFIX
and after a brief search I also couldn't find a documentation page about it. The _
prefix also indicates that it might be only an internal variable one should not rely on.
I have to admit that my CMake code is specific to Arch Linux where strip is installed under e.g. /usr/x86_64-w64-mingw32/bin/strip
and CMAKE_FIND_ROOT_PATH
set to /usr/x86_64-w64-mingw32
. The only purpose of dealing with strip here at all is to simplify the cross compilation under Arch Linux where the package build system is not able to invoke the correct strip from the cross compilation tool-chain. I should likely make the entire code block disabled by default and only enable it under Arch Linux.
Since you're compiling under Windows you likely just want to use the regular make install
and not the targets added by this problematic code.
I disabled that code so nobody is bothered by it.
By the way, I recently did a lot of refactoring in the build system to deal with some use-cases I have in mind. I hope it still works under Windows (building static libraries and creating a fully statically linked application is now handled differently).
I see you have all this code here for finding strip:
https://github.com/Martchus/cpp-utilities/blob/master/cmake/modules/LibraryTarget.cmake
but why? It seems the standard way is to set
_CMAKE_TOOLCHAIN_PREFIX
as I have done, and as is used by Cmake even:https://github.com/Kitware/CMake/blob/master/Modules/CMakeFindBinUtils.cmake