Ajout de Jolt Physics + 1ere version des factory entitecomposants - camera, transform, rigidbody, collider, renderer
This commit is contained in:
@@ -347,6 +347,18 @@ else()
|
||||
endif()
|
||||
# ---------------------------------------
|
||||
|
||||
# ---------- Inclusion de JoltPhysics -----------
|
||||
# JoltPhysics Lib Moteur physique.
|
||||
set(JoltPhysicslib_DIR ./lib/CMake/Linux)
|
||||
# # Les autre plateforme (Linux...) ont un installateur de paquet, la lib se trouve toute seul.
|
||||
find_package(JoltPhysicslib REQUIRED)
|
||||
if(JoltPhysicslib_FOUND)
|
||||
message("lib JOLT Trouvé")
|
||||
else()
|
||||
message("lib JOLT Introuvable")
|
||||
endif()
|
||||
# ---------------------------------------
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
@@ -386,7 +398,7 @@ function(compile_slang_shaders SLANG_FILES OUTPUT_DIR)
|
||||
endfunction()
|
||||
|
||||
|
||||
add_library(Engine SHARED ${SRCS_ENGINE} ${SRCS_EXTERNAL_GLAD})
|
||||
add_library(Engine STATIC ${SRCS_ENGINE} ${SRCS_EXTERNAL_GLAD})
|
||||
add_executable(${PROJECT} ${SRCS})
|
||||
add_executable(CosmicTest ${SRCS_TESTS})
|
||||
|
||||
@@ -434,6 +446,7 @@ include_directories(${VMA_INCLUDE_DIRS})
|
||||
include_directories(${ASSIMP_INCLUDE_DIRS})
|
||||
# ODE
|
||||
#include_directories(${ODE_INCLUDE_DIRS})
|
||||
include_directories(${JOLT_INCLUDE_DIRS})
|
||||
# SNDFILE
|
||||
#include_directories(${SNDFILE_INCLUDE_DIRS})
|
||||
# OPENAL
|
||||
@@ -475,6 +488,13 @@ target_link_libraries(Engine ${ASSIMP_LIBRARIES})
|
||||
# ODE
|
||||
#target_link_libraries(Engine ${ODE_LIBRARIES})
|
||||
|
||||
target_compile_definitions(Engine PRIVATE
|
||||
JPH_PROFILE_ENABLED
|
||||
JPH_DEBUG_RENDERER
|
||||
JPH_OBJECT_STREAM
|
||||
)
|
||||
target_link_libraries(Engine ${JOLT_LIBRARIES})
|
||||
|
||||
# SNDFILE
|
||||
#target_link_libraries(Engine sndfile)
|
||||
|
||||
@@ -499,13 +519,13 @@ target_link_libraries(Engine ${ASSIMP_LIBRARIES})
|
||||
|
||||
target_link_libraries(${PROJECT} Engine)
|
||||
|
||||
if(UNIX)
|
||||
add_custom_command(
|
||||
TARGET Engine POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libEngine.so
|
||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
endif()
|
||||
#if(UNIX)
|
||||
#add_custom_command(
|
||||
# TARGET Engine POST_BUILD
|
||||
# COMMAND ${CMAKE_COMMAND} -E copy
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/libEngine.so
|
||||
# ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
#endif()
|
||||
|
||||
# Paramètre de compilation
|
||||
if (UNIX)
|
||||
|
||||
Reference in New Issue
Block a user