diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f809e45..08edafef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,8 +54,14 @@ jobs: run: | echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - name: Install opengl - run: vcpkg install opengl + - name: Install dependencies on Ubuntu + if: runner.os == 'Linux' + run: > + sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev + xorg-dev libblocksruntime-dev + + - name: CMake Version + run: cmake --version - 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. diff --git a/CMakeLists.txt b/CMakeLists.txt index faa3492f..fc86b134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ endif() if(CMAKE_C_COMPILER_ID STREQUAL "Clang") option(FORCE_CLANG_BLOCKS "Force enable Clang blocks" YES) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nan-infinity-disabled") endif() # sanity checks... diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt index 2ce0a7e5..41b875dd 100644 --- a/demo/CMakeLists.txt +++ b/demo/CMakeLists.txt @@ -38,6 +38,15 @@ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") list(APPEND chipmunk_demos_libraries BlocksRuntime) endif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + + +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_C_COMPILER_ID STREQUAL "Clang") + list(APPEND chipmunk_demos_libraries BlocksRuntime) + endif() +endif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + + include_directories(${chipmunk_demos_include_dirs}) link_directories(${chipmunk_demos_library_dirs}) add_executable(chipmunk_demos ${chipmunk_demos_source_files})