mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
VCPKG Full refactor
uses local cache for assets now so should be able to produce an offline build with vcpkg. Only a couple of libraries left that are too big, and the vcpkg repo itself has files that are blocked from the repo. We could get around both issues by utilizing a submodule
This commit is contained in:
parent
0b73e701ac
commit
392df11e2b
9683 changed files with 284 additions and 3462845 deletions
|
|
@ -3,19 +3,8 @@ option(TORQUE_PHYSICS_BULLET "Use Bullet physics" OFF)
|
|||
|
||||
if(TORQUE_PHYSICS_BULLET)
|
||||
message("Enabling Bullet Module")
|
||||
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} BulletSoftBody Bullet3Dynamics BulletInverseDynamics BulletCollision
|
||||
Bullet2FileLoader BulletDynamics Bullet3OpenCL_clew Bullet3Common
|
||||
LinearMath Bullet3Geometry Bullet3Collision)
|
||||
find_package(Bullet CONFIG REQUIRED)
|
||||
set(TORQUE_LINK_THIRDPARTY ${TORQUE_LINK_THIRDPARTY} BulletDynamics BulletCollision LinearMath Bullet3Common)
|
||||
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} TORQUE_PHYSICS_BULLET TORQUE_PHYSICS_ENABLED)
|
||||
set(TORQUE_INCLUDE_DIRECTORIES ${TORQUE_INCLUDE_DIRECTORIES} "${TORQUE_LIB_ROOT_DIRECTORY}/bullet/src" )
|
||||
|
||||
# Since Bullet lives elsewhere we need to ensure it is known to Torque when providing a link to it
|
||||
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Bullet Shared Libs" FORCE)
|
||||
set(BUILD_CPU_DEMOS OFF CACHE BOOL "Bullet CPU Demos" FORCE)
|
||||
set(BUILD_BULLET2_DEMOS OFF CACHE BOOL "Bullet2 Demos" FORCE)
|
||||
set(BUILD_EXTRAS OFF CACHE BOOL "Set when you want to build the extras" FORCE)
|
||||
set(USE_GRAPHICAL_BENCHMARK OFF CACHE BOOL "Use Graphical Benchmark" FORCE)
|
||||
set(USE_GLUT OFF CACHE BOOL "Use Glut" FORCE)
|
||||
add_subdirectory("${TORQUE_LIB_ROOT_DIRECTORY}/bullet" ${TORQUE_LIB_TARG_DIRECTORY}/bullet EXCLUDE_FROM_ALL)
|
||||
# No more add_subdirectory — vcpkg's bullet3 port provides the targets above.
|
||||
endif(TORQUE_PHYSICS_BULLET)
|
||||
|
|
|
|||
|
|
@ -3,16 +3,13 @@ option(TORQUE_NAVIGATION "Enable Navigation module" ON)
|
|||
|
||||
if(TORQUE_NAVIGATION)
|
||||
message("Enabling Navigation Module")
|
||||
|
||||
file(GLOB TORQUE_NAV_SOURCES "${CMAKE_SOURCE_DIR}/Engine/source/navigation/*.cpp" "${CMAKE_SOURCE_DIR}/Engine/source/navigation/*.h")
|
||||
if(TORQUE_TOOLS)
|
||||
file(GLOB_RECURSE TORQUE_NAV_TOOLS "${CMAKE_SOURCE_DIR}/Engine/source/navigation/navMeshTools/*.cpp" "${CMAKE_SOURCE_DIR}/Engine/source/navigation/navMeshTools/*.h")
|
||||
endif()
|
||||
set(TORQUE_SOURCE_FILES ${TORQUE_SOURCE_FILES} ${TORQUE_NAV_SOURCES} ${TORQUE_NAV_TOOLS})
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} recast)
|
||||
find_package(recastnavigation CONFIG REQUIRED)
|
||||
set(TORQUE_LINK_THIRDPARTY ${TORQUE_LINK_THIRDPARTY} RecastNavigation::Detour RecastNavigation::Recast RecastNavigation::DebugUtils RecastNavigation::DetourCrowd)
|
||||
set(TORQUE_COMPILE_DEFINITIONS ${TORQUE_COMPILE_DEFINITIONS} recast TORQUE_NAVIGATION_ENABLED)
|
||||
|
||||
# Since recast lives elsewhere we need to ensure it is known to Torque when providing a link to it
|
||||
add_subdirectory("${TORQUE_LIB_ROOT_DIRECTORY}/recast" ${TORQUE_LIB_TARG_DIRECTORY}/recast EXCLUDE_FROM_ALL)
|
||||
source_group(TREE "${CMAKE_SOURCE_DIR}/Engine/source/navigation/" PREFIX "Modules/NAVIGATION" FILES ${TORQUE_NAV_SOURCES} ${TORQUE_NAV_TOOLS})
|
||||
endif(TORQUE_NAVIGATION)
|
||||
|
|
|
|||
|
|
@ -3,28 +3,14 @@ option(TORQUE_SFX_OPENAL "Use OpenAL SFX" ON)
|
|||
|
||||
if(TORQUE_SFX_OPENAL)
|
||||
message("Enabling OpenAL Module")
|
||||
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal")
|
||||
|
||||
if (APPLE)
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal/mac")
|
||||
elseif (WIN32)
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal/win32")
|
||||
elseif (UNIX)
|
||||
torqueAddSourceDirectories("${CMAKE_SOURCE_DIR}/Engine/source/sfx/openal/linux")
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported OpenAL platform.")
|
||||
endif (APPLE)
|
||||
|
||||
set(TORQUE_LINK_LIBRARIES ${TORQUE_LINK_LIBRARIES} OpenAL)
|
||||
|
||||
# Since OpenAL lives elsewhere we need to ensure it is known to Torque when providing a link to it
|
||||
set(ALSOFT_EXAMPLES OFF CACHE BOOL "OpenAL Examples" FORCE)
|
||||
set(ALSOFT_UTILS OFF CACHE BOOL "OpenAL Utilities" FORCE)
|
||||
set(ALSOFT_UPDATE_BUILD_VERSION OFF CACHE BOOL "Update build Version" UPDATE)
|
||||
|
||||
add_subdirectory("${TORQUE_LIB_ROOT_DIRECTORY}/openal-soft" ${TORQUE_LIB_TARG_DIRECTORY}/openal-soft EXCLUDE_FROM_ALL)
|
||||
if(APPLE)
|
||||
target_compile_options(OpenAL PRIVATE -Wno-error=undef)
|
||||
endif()
|
||||
endif(TORQUE_SFX_OPENAL)
|
||||
find_package(OpenAL CONFIG REQUIRED)
|
||||
set(TORQUE_LINK_THIRDPARTY ${TORQUE_LINK_THIRDPARTY} OpenAL::OpenAL)
|
||||
endif(TORQUE_SFX_OPENAL)
|
||||
Loading…
Add table
Add a link
Reference in a new issue