Add glm dependency

This commit is contained in:
MrLetsplay 2023-10-18 18:39:04 +02:00
parent 638c716507
commit e2b77142ad
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
4 changed files with 22 additions and 8 deletions

3
.gitmodules vendored
View File

@ -13,3 +13,6 @@
[submodule "dependencies/stb"]
path = dependencies/stb
url = https://github.com/nothings/stb.git
[submodule "dependencies/glm"]
path = dependencies/glm
url = https://github.com/g-truc/glm.git

View File

@ -5,6 +5,7 @@ project(KekEngine VERSION 1.0)
option(KEKENGINE_DEBUG "Build with debug information" OFF)
option(KEKENGINE_VR "Include VR support" OFF)
option(KEKENGINE_BUILD_KEKGAME "Build kekgame" OFF)
option(KEKENGINE_DISABLE_ERRORDIALOG "Disable error dialogs" OFF)
if(UNIX)
set(KEKENGINE_TARGET_PLATFORM Linux)
@ -37,11 +38,13 @@ file(GLOB_RECURSE KEKGAME_RELATIVE_RESOURCE_FILES RELATIVE ${KEKGAME_RESOURCE_DI
add_compile_definitions(FT_CONFIG_OPTION_ERROR_STRINGS) # Freetype error strings
if(${KEKENGINE_DEBUG})
add_compile_options(-Wall -std=c++20 -g)
add_compile_options(-Wall -g)
else()
add_compile_options(-Wall -std=c++20 -O3)
add_compile_options(-Wall -O3)
endif()
set(CMAKE_CXX_STANDARD 20)
block()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_subdirectory(dependencies/microtar)
@ -68,6 +71,7 @@ target_include_directories(kekengine PUBLIC "src/kekengine/include")
target_include_directories(kekengine PUBLIC "dependencies/bullet3/src")
target_include_directories(kekengine PUBLIC "dependencies/freetype/include")
target_include_directories(kekengine PUBLIC "dependencies/stb")
target_include_directories(kekengine PUBLIC "dependencies/glm")
target_link_libraries(kekengine PUBLIC microtar_static)
target_link_libraries(kekengine PUBLIC Bullet3Collision BulletDynamics BulletCollision LinearMath Bullet3Collision Bullet3Common Bullet3Dynamics Bullet3Geometry BulletInverseDynamics)
@ -76,11 +80,13 @@ target_link_libraries(kekengine PUBLIC freetype)
if(UNIX)
target_link_libraries(kekengine PUBLIC glfw GLEW GL)
# GTK
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
target_link_libraries(kekengine PUBLIC ${GTK3_LIBRARIES})
target_include_directories(kekengine PRIVATE ${GTK3_INCLUDE_DIRS})
if(NOT ${KEKENGINE_DISABLE_ERRORDIALOG})
# GTK
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
target_link_libraries(kekengine PUBLIC ${GTK3_LIBRARIES})
target_include_directories(kekengine PRIVATE ${GTK3_INCLUDE_DIRS})
endif()
endif()
if(WIN32)
target_link_libraries(kekengine PUBLIC glfw3 glew32s opengl32)
@ -104,6 +110,10 @@ if(${KEKENGINE_VR})
target_include_directories(kekengine PRIVATE "dependencies/openvr/headers")
endif()
if(${KEKENGINE_DISABLE_ERRORDIALOG})
target_compile_definitions(kekengine PUBLIC KEK_DISABLE_ERRORDIALOG)
endif()
add_library(kekengine_shared SHARED $<TARGET_OBJECTS:kekengine>)
target_link_libraries(kekengine_shared PUBLIC kekengine)
set_target_properties(kekengine_shared PROPERTIES OUTPUT_NAME kekengine)

1
dependencies/glm vendored Submodule

@ -0,0 +1 @@
Subproject commit 47585fde0c49fa77a2bf2fb1d2ead06999fd4b6e

@ -1 +1 @@
Subproject commit 66dbf3cf8623b522d6413c6e994ec45f66288bd5
Subproject commit 3b1cbd505fdcd7bb9cb1764b0cc4fce72ad645b2