This commit is contained in:
Nishi 2026-01-31 09:25:44 +09:00
commit 13ed1d2d96
Signed by: nishi
GPG key ID: 27EF69B208EB9343
5 changed files with 10 additions and 3 deletions

View file

@ -28,8 +28,10 @@ add_library(GearSrc SHARED ${GearSrc_SRC})
target_include_directories(GearSrc PUBLIC include)
target_compile_definitions(GearSrc PRIVATE _GEARSRC)
target_link_libraries(GearSrc PRIVATE ode lz4)
target_link_options(GearSrc PRIVATE -static-libgcc -static-libstdc++)
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_options(GearSrc PRIVATE -static-libgcc -static-libstdc++)
else()
target_link_libraries(GearSrc PRIVATE stdc++)
target_link_libraries(GearSrc PRIVATE m pthread)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

View file

@ -12,6 +12,7 @@ file(GLOB ODE_SRC
add_library(ode ${ODE_SRC})
target_include_directories(ode PUBLIC
../../submodule/ode/include
${CMAKE_CURRENT_BINARY_DIR}
)
target_include_directories(ode PRIVATE
../../submodule/ode/ode/src
@ -21,7 +22,6 @@ target_include_directories(ode PRIVATE
../../submodule/ode/GIMPACT/include
../../submodule/ode/libccd/src/custom
../../submodule/ode/libccd/src
${CMAKE_CURRENT_BINARY_DIR}
)
list(REMOVE_ITEM ODE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../submodule/ode/ode/src/collision_trimesh_trimesh_old.cpp)

View file

@ -21,5 +21,6 @@
#include <GearSrc/SoundEngine.h>
#include <GearSrc/Sound.h>
#include <GearSrc/Net.h>
#include <GearSrc/Physics.h>
#endif

View file

@ -175,6 +175,7 @@ struct _GSNetKV {
#ifdef _GEARSRC
#include <GearSrc/GL/GL.h>
#include <miniaudio.h>
#include <ode/ode.h>
struct _GSGL {
GSEngine engine;

View file

@ -7,6 +7,7 @@
#include <GearSrc/Resource.h>
#include <GearSrc/String.h>
#include <GearSrc/Net.h>
#include <GearSrc/Physics.h>
#include <stb_ds.h>
@ -16,6 +17,8 @@ void GSInit(void) {
GSVersionGet(&version);
GSLog(NULL, GSLogInfo, "GearSrc Engine %s", version.string);
GSPhysicsInit();
}
GSBool GSEngineRegisterResource(GSEngine engine, const char* name, const char* path) {