Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump lib dependencies #617

Merged
merged 13 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
core/lib/** linguist-vendored
core/lib/** linguist-vendored -diff
engine/lib/** linguist-vendored -diff
1 change: 1 addition & 0 deletions .github/workflows/build-engine-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- name: Install dependencies
run: |
brew install glfw llvm@14 ccache
python -m pip install jinja2

- name: Get timestamp
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-engine-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- name: Install dependencies
run: |
choco install ccache --version ${{ env.CCACHE_VERSION }}
python -m pip install jinja2

- name: Get timestamp
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: |
run-clang-tidy -j$(nproc) -p=build \
-header-filter="(core|engine)/(src|include)/.*" \
files "($(git diff -U0 --name-only HEAD^ | paste -s -d\|))" \
files "($(git diff -U0 --name-only HEAD^ | grep -vP '.*/lib/.*' | paste -s -d\|))" \
-export-fixes clang-tidy-fixes.yaml || true

- name: Run clang-tidy-pr-comments action
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@
[submodule "engine/lib/imgui"]
path = engine/lib/imgui
url = https://github.com/ocornut/imgui.git
[submodule "core/lib/json"]
path = core/lib/json
url = https://github.com/nlohmann/json.git
[submodule "core/lib/glad"]
path = core/lib/glad
url = [email protected]:Dav1dde/glad.git
13 changes: 8 additions & 5 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ cubos_common_target_options(cubos-core)
# Link dependencies

if (WITH_OPENGL)
add_subdirectory(lib/glad)
target_link_libraries(cubos-core PRIVATE glad)
set(GLAD_SOUURCES_DIR "lib/glad")
add_subdirectory("${GLAD_SOUURCES_DIR}/cmake" glad_cmake SYSTEM)
glad_add_library(glad REPRODUCIBLE API gl:core=3.3)
target_link_libraries(cubos-core PUBLIC glad)
RiscadoA marked this conversation as resolved.
Show resolved Hide resolved
target_compile_definitions(cubos-core PRIVATE WITH_OPENGL)
endif ()

Expand Down Expand Up @@ -123,7 +125,7 @@ if (WITH_OPENAL)
endif()

if (GLM_USE_SUBMODULE)
add_subdirectory(lib/glm)
add_subdirectory(lib/glm SYSTEM)
else ()
find_package(glm REQUIRED)
endif ()
Expand All @@ -147,6 +149,7 @@ else ()
find_package(spdlog REQUIRED)
endif ()

set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(lib/json)

add_subdirectory(lib/stduuid)
Expand All @@ -156,8 +159,8 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

target_compile_definitions(cubos-core PUBLIC GLM_FORCE_SILENT_WARNINGS) # Needed for compilation to succeed on MSVC
target_link_libraries(cubos-core PUBLIC glm::glm spdlog fmt::fmt json ${CMAKE_DL_LIBS})
target_link_libraries(cubos-core PRIVATE glad Threads::Threads)
target_link_libraries(cubos-core PUBLIC glm::glm spdlog nlohmann_json::nlohmann_json fmt::fmt ${CMAKE_DL_LIBS})
target_link_libraries(cubos-core PRIVATE Threads::Threads)

# Add core tests

Expand Down
1 change: 1 addition & 0 deletions core/lib/glad
Submodule glad added at d08b1a
2 changes: 0 additions & 2 deletions core/lib/glad/CMakeLists.txt

This file was deleted.

290 changes: 0 additions & 290 deletions core/lib/glad/include/KHR/khrplatform.h

This file was deleted.

Loading
Loading