Closed YanzhaoW closed 4 months ago
Thanks for your report @YanzhaoW
It seems your CMakeLists.txt
is incorrect. The cmake_minimum_required()
must be before project()
.
Also, you will need to set the CXX standard, otherwise sol2 will fail, so something like:
cmake_minimum_required(VERSION 3.24)
project(cppsol2)
set(CMAKE_CXX_STANDARD 17)
find_package(sol2 REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main PUBLIC sol2::sol2)
Thanks very much for your answer. @memsharded
Yes, putting cmake_minimum_required()
before project()
solves the issue.
Hello,
I'm trying to install conan packages using conan_provider. But I got the following error:
command
CMakePresets.json
CMakeLists.txt
conanfile.txt
Here are some version infos: