snaxgameengine / snax

SnaX Game Engine - Open Source
Other
22 stars 5 forks source link

CMaker failed when run GenerateSnaX.bat #2

Open 123ysys opened 9 months ago

123ysys commented 9 months ago

Hello. After hard time trying, I finally installed all vcpkg. Cheers!

However, I meet the problems shown below when running CMake Generator bat file:

G:\Snax>GenerateSnaX.bat

Welcome to the SnaX Game Engine generator script!
=================================================

This script will use CMake to generate, and optionally
build, Visual Studio projects and solution for SnaX.

Do you want to continue (y/n)? y

Which generator would you like to use:
1. Visual Studio 16 2019
2. Visual Studio 17 2022
Select preset (1-2): 2

Would you like to use CMake GUI for configuration (y/n)? n
Preset CMake variables:

  CMAKE_CROSSCOMPILING:BOOL="TRUE"
  CMAKE_TOOLCHAIN_FILE:FILEPATH="./vcpkg/scripts/buildsystems/vcpkg.cmake"

Current Configuration:
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:202 (message):
  CMAKE_CROSSCOMPILING has been set by the project, toolchain file, or user.
  CMake is resetting it to false because CMAKE_SYSTEM_NAME was not set.  To
  indicate cross compilation, only CMAKE_SYSTEM_NAME needs to be set.
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22635.
-- The C compiler identification is MSVC 19.38.33134.0
-- The CXX compiler identification is MSVC 19.38.33134.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Iconv: G:/Snax/vcpkg/installed/x64-windows/debug/lib/iconv.lib (found version "1.17")
-- Found ZLIB: optimized;G:/Snax/vcpkg/installed/x64-windows/lib/zlib.lib;debug;G:/Snax/vcpkg/installed/x64-windows/debug/lib/zlibd.lib (found version "1.3.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenMP_C: -openmp (found version "2.0")
-- Found OpenMP_CXX: -openmp (found version "2.0")
-- Found OpenMP: TRUE (found version "2.0")
-- Configuring done (67.7s)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
G:/Snax/PhysXChips/PHYSX_INCLUDE_DIR
   used as include directory in directory G:/Snax/PhysXChips

-- Generating done (8.5s)
CMake Generate step failed.  Build files cannot be regenerated correctly.

Generating SnaX projects failed... cmake returned code: 1

I found some codes segments in CMakeList.txt:

find_library(PHYSX_LIBRARY_RELEASE PhysX_64.lib NAMES PHYSX PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(PHYSX_LIBRARY_DEBUG PhysX_64.lib NAMES PHYSX PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED)
select_library_configurations(PHYSX)

find_library(PHYSXCOMMON_LIBRARY_RELEASE PhysXCommon_64.lib NAMES PHYSXCOMMON PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(PHYSXCOMMON_LIBRARY_DEBUG PhysXCommon_64.lib NAMES PHYSXCOMMON PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED)
select_library_configurations(PHYSXCOMMON)

find_library(PHYSXCOOKING_LIBRARY_RELEASE PhysXCooking_64.lib NAMES PHYSXCOOKING PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(PHYSXCOOKING_LIBRARY_DEBUG PhysXCooking_64.lib NAMES PHYSXCOOKING PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED)
select_library_configurations(PHYSXCOOKING)

find_library(PHYSXFOUNDATION_LIBRARY_RELEASE PhysXFoundation_64.lib NAMES PHYSXFOUNDATION PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(PHYSXFOUNDATION_LIBRARY_DEBUG PhysXFoundation_64.lib NAMES PHYSXFOUNDATION PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED)
select_library_configurations(PHYSXFOUNDATION)

find_library(PHYSXEXTENSIONS_LIBRARY_RELEASE PhysXExtensions_static_64.lib NAMES PHYSXEXTENSIONS PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(PHYSXEXTENSIONS_LIBRARY_DEBUG PhysXExtensions_static_64.lib NAMES PHYSXEXTENSIONS PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED)
select_library_configurations(PHYSXEXTENSIONS)

find_library(PHYSXPVDSDK_LIBRARY_RELEASE PhysXPvdSDK_static_64.lib NAMES PHYSXPVDSDK PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(PHYSXPVDSDK_LIBRARY_DEBUG PhysXPvdSDK_static_64.lib NAMES PHYSXPVDSDK PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED)
select_library_configurations(PHYSXPVDSDK)

Which part should I change and change to what? Thank you.