Fixed more cmake errors on macOS

This commit is contained in:
Graham Pentheny
2026-02-03 16:36:46 -05:00
parent 333aec628c
commit 142fc3475d
3 changed files with 13 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.conf}} -DSDL2_LIBRARY=${{github.workspace}}/RecastDemo/Bin/SDL2.framework
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.conf}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.conf}}

View File

@@ -91,6 +91,11 @@ set_target_properties(RecastDemo PROPERTIES
CXX_EXTENSIONS OFF # Disable compiler-specific extensions
)
# Suppress deprecated OpenGL warnings on macOS (gluPerspective, gluProject, etc.)
if (APPLE)
target_compile_options(RecastDemo PRIVATE -Wno-deprecated-declarations)
endif()
if (WIN32)
if ("${CMAKE_MAKE_PROGRAM}" MATCHES "MSBuild")
target_compile_definitions(RecastDemo PUBLIC _CRT_SECURE_NO_WARNINGS)

View File

@@ -16,6 +16,13 @@ set_target_properties(Tests PROPERTIES
CXX_EXTENSIONS OFF # Disable compiler-specific extensions
)
# Remove warnings-as-errors for third-party code
if(MSVC)
target_compile_options(Tests PRIVATE /W3 /WX-)
else()
target_compile_options(Tests PRIVATE -Wno-error)
endif()
add_dependencies(Tests Recast Detour DetourCrowd)
target_link_libraries(Tests Recast Detour DetourCrowd)