Devolutions / Devolutions/CMakeRust
Windows build fails (using MinGW toolchain)
- 主要语言
- CMake
- 星标
- 175
- 派生
- 30
- PR 合并指标
- 30 天内没有已合并 PR
描述
I am getting a build error, from CLion using the MinGW toolchain, on Windows only. Builds on Mac without issues.
```
mingw32-make.exe[2]: *** No rule to make target 'my-lib/x86_64-pc-windows-msvc/debug/libmy_lib.a', needed by '/my-app.exe'. Stop.
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:96: /CMakeFiles/APP.dir/all] Error 2
```
It seems to be looking for a `libmy_lib.a`, when what is generated is `my_lib.lib`.
I have a top level `CMakeLists.txt`:
```cmake
cmake_minimum_required(VERSION 3.14)
project(app)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
enable_language(Rust)
include(CMakeCargo)
include_directories("include")
add_subdirectory("my-app")
add_subdirectory("my-lib")
target_link_libraries(APP PRIVATE
my_lib
$<$:ws2_32>
$<$:userenv>
)
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。