From 84826a6c81fc2801deec120594ab43721b3962ec Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Wed, 4 Aug 2021 09:39:44 +0900 Subject: [PATCH] Change default CMakeLists.txt (#43) * Change default CMakeLists.txt to add Ubuntu18 support * Change cmake minimum required version --- templates/app/CMakeLists.txt.tmpl | 4 ++-- templates/app/flutter/CMakeLists.txt | 8 ++++---- templates/app/runner/CMakeLists.txt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/app/CMakeLists.txt.tmpl b/templates/app/CMakeLists.txt.tmpl index 1e2618d..4fb714a 100644 --- a/templates/app/CMakeLists.txt.tmpl +++ b/templates/app/CMakeLists.txt.tmpl @@ -1,9 +1,9 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.15) project(runner LANGUAGES CXX) set(BINARY_NAME "{{projectName}}") -cmake_policy(SET CMP0079 NEW) +cmake_policy(SET CMP0063 NEW) set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") diff --git a/templates/app/flutter/CMakeLists.txt b/templates/app/flutter/CMakeLists.txt index 376be86..f141a3c 100644 --- a/templates/app/flutter/CMakeLists.txt +++ b/templates/app/flutter/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.15) set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") @@ -59,16 +59,16 @@ list(APPEND CPP_WRAPPER_SOURCES_CORE "core_implementations.cc" "standard_codec.cc" ) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list_prepend(CPP_WRAPPER_SOURCES_CORE "${WRAPPER_ROOT}/") list(APPEND CPP_WRAPPER_SOURCES_PLUGIN "plugin_registrar.cc" ) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list_prepend(CPP_WRAPPER_SOURCES_PLUGIN "${WRAPPER_ROOT}/") list(APPEND CPP_WRAPPER_SOURCES_APP "flutter_engine.cc" "flutter_view_controller.cc" ) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") +list_prepend(CPP_WRAPPER_SOURCES_APP "${WRAPPER_ROOT}/") # Wrapper sources needed for a plugin. add_library(flutter_wrapper_plugin STATIC diff --git a/templates/app/runner/CMakeLists.txt b/templates/app/runner/CMakeLists.txt index 8bb1779..d15d5ca 100644 --- a/templates/app/runner/CMakeLists.txt +++ b/templates/app/runner/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.15) project(runner LANGUAGES CXX) if(FLUTTER_TARGET_BACKEND_TYPE MATCHES "gbm")