Skip to content

Commit

Permalink
Fix various build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterPeModder committed Jun 10, 2022
1 parent bb6331f commit 10042ba
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y cmake
sudo apt-get install -y python3
sudo apt-get install -y libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
- name: Checkout repository
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ if (BUILD_TEST_SUITE)
# Check for GoogleTest
find_package(googletest REQUIRED)

# Disable error on Linux release builds
if (COMPILER_TYPE MATCHES "gcc")
target_compile_options(gtest PRIVATE "-Wno-error=restrict")
endif()

enable_testing()

add_subdirectory(tests)
Expand Down
1 change: 1 addition & 0 deletions cmake/Findgoogletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/e2239ee6043f73722e7aa812a459f54a28552929.zip
URL_HASH MD5=feb94215fd6d9eb3b5f14d06d97ece00
)

# For Windows: Prevent overriding the parent project's compiler/linker settings
Expand Down
7 changes: 6 additions & 1 deletion cmake/Findraylib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ if (NOT raylib_FOUND)
set(CMAKE_POLICY_DEFAULT_CMP0072 NEW)
cmake_policy(SET CMP0072 NEW)

FetchContent_Declare(raylib URL https://github.com/raysan5/raylib/archive/refs/tags/4.0.0.tar.gz)
FetchContent_Declare(
raylib
URL https://github.com/raysan5/raylib/archive/refs/tags/4.0.0.tar.gz
URL_HASH MD5=7b4ffb9d3b6a01806be21a7cd93e2c53
)

FetchContent_GetProperties(raylib)
if (NOT raylib_POPULATED)
SET(FETCHCONTENT_QUIET NO)
Expand Down
4 changes: 4 additions & 0 deletions cmake/mujs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ set(SRC ${SRCROOT}/one.c)

add_library(mujs STATIC ${SRC})
target_include_directories(mujs PUBLIC ${SRCROOT})

if (COMPILER_TYPE MATCHES "gcc")
target_compile_options(mujs PRIVATE "-Wno-error")
endif()
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/src)
set(GENERATED_SRC ${SRCROOT}/bindings.cpp ${SRCROOT}/bindings.js)
add_custom_command(
OUTPUT ${GENERATED_SRC}
COMMAND python ${PROJECT_SOURCE_DIR}/generate_bindings.py ${SRCROOT}/script/api ${GENERATED_SRC}
COMMAND python3 ${PROJECT_SOURCE_DIR}/generate_bindings.py ${SRCROOT}/script/api ${GENERATED_SRC}
VERBATIM
)

Expand Down
2 changes: 1 addition & 1 deletion src/script/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace bmjs
this->load(modPath);
}

void Engine::_loadApi() { this->_loadApi(); }
void Engine::loadApi() { this->_loadApi(); }

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Modding
Expand Down

0 comments on commit 10042ba

Please sign in to comment.