ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.12k stars 500 forks source link

SOL2 failed to setup due to CMake Error on MSVC #1427

Open fangzhouxia opened 1 year ago

fangzhouxia commented 1 year ago

Describe: Hi all, SOL2 failed to setup with CMake Error on MSVC. Could you please help look at this issue or provide some workarounds? Thanks in advance.

For Error Reports:

  1. open VS2019 x64 tools command.
  2. git clone https://github.com/ThePhD/sol2 F:\gitP\ThePhD\sol2
  3. VSCMD_SKIP_SENDTELEMETRY=1 & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64
  4. cd F:\gitP\ThePhD\sol2 & mkdir build_amd64 & cd F:\gitP\ThePhD\sol2\build_amd64
  5. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -DSOL2_LUA_VERSION=5.3.5 -DSOL2_CI=ON -DSOL2_BUILD_LUA=ON -DBUILD_LUA_AS_DLL=ON -DSOL2_TESTS=ON -DSOL2_EXAMPLES=ON -DSOL2_TESTS_EXAMPLES=ON ..

Expected behavior: Setup successfully

Actual behavior: configure (2).log CMake Error at cmake/Packages/FindLuaBuild/LuaVanilla.cmake:251 (add_dependencies): The dependency target "LUA_VANILLA" of target "liblua-5.3.5" does not exist. Call Stack (most recent call first): cmake/Packages/FindLuaBuild.cmake:86 (include) cmake/Packages/FindLuaBuild.cmake:112 (find_lua_build) CMakeLists.txt:229 (find_package) -- Generating done CMake Warning: Manually-specified variables were not used by the project: CMAKE_BUILD_TYPE

Configuration: VS version: VS2019(16.11.20) Operating system: windows server 2019 The commit is f81643a

Thanks for helping sol2 grow!

jiexuan357 commented 1 year ago

Have you solved your problem?