mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-06-08 08:13:49 +00:00
Fixed more cmake errors on macOS
This commit is contained in:
2
.github/workflows/Build.yaml
vendored
2
.github/workflows/Build.yaml
vendored
@@ -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}}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user