Skip to content

Commit

Permalink
Be compatible with CMake 3.10 again (#2296)
Browse files Browse the repository at this point in the history
* Be compatible with CMake 3.10 again

* Windows fix

* Add CMake changes to patch file
  • Loading branch information
romainguy authored Mar 27, 2020
1 parent 232bf72 commit 94a01c6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To build Filament, you must first install the following tools:

- CMake 3.12 (or more recent)
- CMake 3.10 (or more recent)
- clang 7.0 (or more recent)
- [ninja 1.8](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) (or more recent)

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function print_help {

# Requirements
CMAKE_MAJOR=3
CMAKE_MINOR=12
CMAKE_MINOR=10
ANDROID_NDK_VERSION=21

# Internal variables
Expand Down
4 changes: 2 additions & 2 deletions third_party/spirv-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ if(NOT COMMAND find_host_program)
endif()

# Tests require Python3
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(CMAKE_VERSION VERSION_LESS "3.12" OR ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
find_host_package(PythonInterp 3 REQUIRED)
else()
find_package (Python3 COMPONENTS Interpreter)
find_package(Python3 COMPONENTS Interpreter)
endif()

# Check for symbol exports on Linux.
Expand Down
13 changes: 13 additions & 0 deletions third_party/spirv-tools/filament-specific-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,16 @@ index 6ed56a81..2392dfd8 100755

# Install pkg-config file
if (ENABLE_SPIRV_TOOLS_INSTALL)
@@ -201,7 +201,11 @@ if(NOT COMMAND find_host_program)
endif()

# Tests require Python3
-find_host_package(PythonInterp 3 REQUIRED)
+if(CMAKE_VERSION VERSION_LESS "3.12" OR ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ find_host_package(PythonInterp 3 REQUIRED)
+else()
+ find_package(Python3 COMPONENTS Interpreter)
+endif()

# Check for symbol exports on Linux.
# At the moment, this check will fail on the OSX build machines for the Android NDK.

0 comments on commit 94a01c6

Please sign in to comment.