Use CMake buildsystem for build
ChenPi11 opened this issue · 2 comments
I tkink use MSBuild is not a good idea.
If I want use v142 toolchain for build, it will cause a error like this:
1>------ 已启动生成: 项目: libiconv, 配置: Release x64 ------
1>D:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Platform.targets(67,5): error MSB8020: 无法找到 v143 的生成工具(平台工具集 =“v143”)。若要使用 v143 生成工具进行生成,请安装 v143 生成工具。或者,可以升级到当前 Visual Studio 工具,方式是通过选择“项目”菜单或右键单击该解决方案,然后选择“重定解决方案目标”。
1>已完成生成项目“libiconv.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
It means v143 tool chain not found, I know I can configure toolchain manual. But it's very troublesome.
If we use CMake for build, CMake can automatically generate a temp msbuild project(On MSVC toolchain). It will automatically choose toolchain. CMake buildsystem is more flexible and more easier to config.
If you agree this issue, I will soon write a CMakeLists.
Thank you.
Meanwhile, CMake has more advantages, such as compiling in non MSVC environments, and so on.
Hi @ChenPi11
You can check this repo's and its upstream's history. Both come from this article: How-to-Build-libiconv-with-Microsoft-Visual-Studio
So, my goal is to make libiconv easier to use with VisualStduio's native project.
If you want to use libiconv with non MSVC environment, you can check the libiconv in MSYS/MinGW.
Sure, you can create a pull request for this.
But, I recommend you to add CMake support as an option, don't overwrite the current VisualStduio project. Thanks.