drogonframework / drogonframework/drogon
Unable to build with WSL2
- Dominant language
- C++
- Stars
- 14.3k
- Forks
- 1.4k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 15
Description
I'm trying to build my project under WSL2 but always I get error on CMAKE_INSTALL_PREFIX variable being defined multiple times.
I can correctly build and run project under Windows with vcpkg installed libs, but I can't do the same for WSL2.
I added these lines in CMakeLists.txt file:
```
if(WIN32)
message(STATUS "Configuring for Windows")
set(CMAKE_TOOLCHAIN_FILE "[...]/vcpkg/scripts/buildsystems/vcpkg.cmake")
set(VCPKG_TARGET_TRIPLET "x64-windows")
elseif(UNIX AND NOT APPLE)
message(STATUS "Configuring for Linux")
set(CMAKE_TOOLCHAIN_FILE "[...]/vcpkg/scripts/buildsystems/vcpkg.cmake")
set(VCPKG_TARGET_TRIPLET "x64-linux")
endif()
```
It correctly finds all the libs as I see `Found Brotli: [...]/vcpkg/installed/x64-linux/debug/lib/libbrotlidec-static.a` and it takes ~ 139 seconds to build all, instead of 10 secs in windows env.
As soon as I start build it I get CMAKE_INSTALL_PREFIX error plus other 900 error too.

My goal is to use build this project for windows and arm64 linux, but I'm only able to build for windows...
What I'm missing?
Contributor guide
Assessment
This issue has not been assessed yet.