11#
22# MIT License
33#
4- # Copyright (c) 2018 Joel Winarske
4+ # Copyright (c) 2018-2020 Joel Winarske
55#
66# Permission is hereby granted, free of charge, to any person obtaining a copy
77# of this software and associated documentation files (the "Software"), to deal
2222# SOFTWARE.
2323#
2424
25- cmake_minimum_required (VERSION 3.11)
26-
27- if (POLICY CMP0068)
28- cmake_policy (SET CMP0068 NEW)
29- set (CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON )
30- endif ()
31-
32- if (POLICY CMP0075)
33- cmake_policy (SET CMP0075 NEW)
34- endif ()
25+ cmake_minimum_required (VERSION 3.15)
3526
3627if (NOT CMAKE_BUILD_TYPE )
37- set (CMAKE_BUILD_TYPE "MinSizeRel " CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE)
38- message (STATUS "CMAKE_BUILD_TYPE not set, defaulting to MinSizeRel ." )
28+ set (CMAKE_BUILD_TYPE "Release " CACHE STRING "Choose the type of build, options are: Debug, Release, or MinSizeRel." FORCE)
29+ message (STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release ." )
3930endif ()
4031
4132set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH} " "${CMAKE_SOURCE_DIR} /cmake" )
@@ -51,25 +42,18 @@ project(${PACKAGE_NAME} VERSION "${FLUTTER_EMBEDDED_VERSION}" LANGUAGES CXX C)
5142message (STATUS "Generator .............. ${CMAKE_GENERATOR} " )
5243message (STATUS "Build Type ............. ${CMAKE_BUILD_TYPE} " )
5344
54- option (BUILD_PLATFORM_SYSROOT "Build Platform sysroot" ON )
45+ include (ProcessorCount)
46+ ProcessorCount(NUM_PROC)
5547
56- option (BUILD_RPI_FLUTTER "Build Flutter for Raspberry Pi" ON )
57- option (BUILD_WAYLAND_FLUTTER "Build Flutter for Wayland" OFF )
5848
59- include (build_dependencies)
49+ include (options )
50+ include (sysroot)
51+ include (depot_tools)
52+ include (engine)
6053
61- if (ANDROID)
62- set (FLUTTER_TARGET_NAME "Android" )
63- else ()
64-
65- if (BUILD_RPI_FLUTTER)
66- include (rpi)
67-
68- elseif (BUILD_WAYLAND_FLUTTER)
69- include (wayland)
70-
71- endif ()
7254
55+ if (BUILD_FLUTTER_RPI)
56+ include (rpi)
57+ elseif (BUILD_FLUTTER_WAYLAND)
58+ include (wayland)
7359endif ()
74-
75- message (STATUS "Flutter ................ ${FLUTTER_TARGET_NAME} " )
0 commit comments