From e12bc9cf626aa54db1d878114b87097b29afc08a Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 15 Mar 2022 01:55:27 -0700 Subject: [PATCH] Setup Globbing with CONFIGURE_DEPENDS inside CMake files. Summary: This Diff moves from specifying a list of files to use file(GLOB) with CONFIGURE_DEPENDS on several CMakefiles. I've updates those where we use globbing also inside buck. Changelog: [Internal] [Changed] - Setup Globbing with CONFIGURE_DEPENDS inside CMake files Reviewed By: ShikaSD Differential Revision: D34826311 fbshipit-source-id: 8fc654626c897cdc4cdd79c699ce19f1e5e1212f --- .../react/common/mapbuffer/jni/CMakeLists.txt | 12 +++++------- .../facebook/react/jscexecutor/CMakeLists.txt | 5 +++-- .../react/modules/blob/jni/CMakeLists.txt | 7 +++---- .../react/reactperflogger/jni/CMakeLists.txt | 2 +- .../react/turbomodule/core/jni/CMakeLists.txt | 2 +- .../react/uimanager/jni/CMakeLists.txt | 7 +++---- .../src/main/jni/first-party/fb/CMakeLists.txt | 2 +- .../jni/first-party/fbgloginit/CMakeLists.txt | 2 +- .../main/jni/first-party/fbjni/CMakeLists.txt | 2 +- .../main/jni/first-party/hermes/CMakeLists.txt | 2 +- .../jni/first-party/yogajni/CMakeLists.txt | 4 ++-- .../src/main/jni/react/jni/CMakeLists.txt | 4 ++-- .../main/jni/third-party/boost/CMakeLists.txt | 3 ++- .../double-conversion/CMakeLists.txt | 2 +- .../main/jni/third-party/fmt/CMakeLists.txt | 2 +- .../main/jni/third-party/folly/CMakeLists.txt | 2 +- .../main/jni/third-party/glog/CMakeLists.txt | 2 +- .../main/jni/third-party/jsc/CMakeLists.txt | 2 +- .../jni/third-party/libevent/CMakeLists.txt | 2 +- ReactCommon/butter/CMakeLists.txt | 17 ++++------------- ReactCommon/callinvoker/CMakeLists.txt | 2 +- ReactCommon/cxxreact/CMakeLists.txt | 4 ++-- ReactCommon/jsi/CMakeLists.txt | 4 ++-- ReactCommon/jsiexecutor/CMakeLists.txt | 2 +- ReactCommon/jsinspector/CMakeLists.txt | 7 +++---- ReactCommon/logger/CMakeLists.txt | 7 +++---- ReactCommon/react/config/CMakeLists.txt | 7 +++---- ReactCommon/react/debug/CMakeLists.txt | 9 +++++---- .../react/nativemodule/core/CMakeLists.txt | 14 ++++++-------- .../react/renderer/animations/CMakeLists.txt | 11 +++-------- .../renderer/attributedstring/CMakeLists.txt | 12 +++--------- .../renderer/componentregistry/CMakeLists.txt | 11 +++-------- .../componentregistry/native/CMakeLists.txt | 9 +++------ .../renderer/components/image/CMakeLists.txt | 12 +++--------- .../renderer/components/root/CMakeLists.txt | 7 +++---- .../components/scrollview/CMakeLists.txt | 12 +++--------- .../renderer/components/text/CMakeLists.txt | 18 +++--------------- .../components/textinput/CMakeLists.txt | 11 +++-------- .../unimplementedview/CMakeLists.txt | 11 +++-------- .../renderer/components/view/CMakeLists.txt | 5 ++--- ReactCommon/react/renderer/core/CMakeLists.txt | 5 ++--- .../react/renderer/debug/CMakeLists.txt | 8 +++----- .../react/renderer/graphics/CMakeLists.txt | 10 ++++++---- .../react/renderer/imagemanager/CMakeLists.txt | 12 ++++++------ .../react/renderer/leakchecker/CMakeLists.txt | 8 +++----- .../react/renderer/mapbuffer/CMakeLists.txt | 8 +++----- .../react/renderer/mounting/CMakeLists.txt | 5 ++--- .../renderer/runtimescheduler/CMakeLists.txt | 11 +++-------- .../react/renderer/scheduler/CMakeLists.txt | 14 +++----------- .../react/renderer/telemetry/CMakeLists.txt | 8 +++----- .../renderer/templateprocessor/CMakeLists.txt | 7 +++---- .../renderer/textlayoutmanager/CMakeLists.txt | 10 ++++++---- .../react/renderer/uimanager/CMakeLists.txt | 10 +++------- ReactCommon/react/utils/CMakeLists.txt | 8 +++----- ReactCommon/reactperflogger/CMakeLists.txt | 7 +++---- ReactCommon/runtimeexecutor/CMakeLists.txt | 2 +- ReactCommon/yoga/CMakeLists.txt | 4 ++-- 57 files changed, 149 insertions(+), 246 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/CMakeLists.txt b/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/CMakeLists.txt index 3f520baf756..680ab4bd274 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/CMakeLists.txt +++ b/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/jni/CMakeLists.txt @@ -3,17 +3,15 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - mapbufferjni - SHARED - react/common/mapbuffer/OnLoad.cpp - react/common/mapbuffer/ReadableMapBuffer.cpp -) +file(GLOB mapbuffer_SRC CONFIGURE_DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/react/common/mapbuffer/*.cpp) + +add_library(mapbufferjni SHARED ${mapbuffer_SRC}) target_include_directories(mapbufferjni PUBLIC diff --git a/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/CMakeLists.txt b/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/CMakeLists.txt index 9be5cfcac90..193426ca041 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/CMakeLists.txt +++ b/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/CMakeLists.txt @@ -3,12 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fvisibility=hidden -fexceptions -frtti) -add_library(jscexecutor SHARED OnLoad.cpp) +file(GLOB jscexecutor_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +add_library(jscexecutor SHARED ${jscexecutor_SRC}) target_include_directories(jscexecutor PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/CMakeLists.txt b/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/CMakeLists.txt index fb936befd7b..023737c44ad 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/CMakeLists.txt +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/blob/jni/CMakeLists.txt @@ -3,14 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fvisibility=hidden -fexceptions -frtti) -add_library(reactnativeblob SHARED - BlobCollector.cpp - OnLoad.cpp) +file(GLOB reactnativeblob_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +add_library(reactnativeblob SHARED ${reactnativeblob_SRC}) target_include_directories(reactnativeblob PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/CMakeLists.txt b/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/CMakeLists.txt index 77cf0453b29..4c10b7eaca2 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/CMakeLists.txt +++ b/ReactAndroid/src/main/java/com/facebook/react/reactperflogger/jni/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall) diff --git a/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/CMakeLists.txt b/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/CMakeLists.txt index e2658fa613f..02cfe42beea 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/CMakeLists.txt +++ b/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/CMakeLists.txt b/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/CMakeLists.txt index 33572211ba2..411832021cb 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/CMakeLists.txt +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/jni/CMakeLists.txt @@ -3,14 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\") -add_library(uimanagerjni SHARED - OnLoad.cpp - ComponentNameResolverManager.cpp) +file(GLOB uimanagerjni_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +add_library(uimanagerjni SHARED ${uimanagerjni_SRC}) target_include_directories(uimanagerjni PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ReactAndroid/src/main/jni/first-party/fb/CMakeLists.txt b/ReactAndroid/src/main/jni/first-party/fb/CMakeLists.txt index 7536286d348..7319e832fcf 100644 --- a/ReactAndroid/src/main/jni/first-party/fb/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/first-party/fb/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_library(fb diff --git a/ReactAndroid/src/main/jni/first-party/fbgloginit/CMakeLists.txt b/ReactAndroid/src/main/jni/first-party/fbgloginit/CMakeLists.txt index 02fb3540f85..bc23ad95063 100644 --- a/ReactAndroid/src/main/jni/first-party/fbgloginit/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/first-party/fbgloginit/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -fno-omit-frame-pointer) diff --git a/ReactAndroid/src/main/jni/first-party/fbjni/CMakeLists.txt b/ReactAndroid/src/main/jni/first-party/fbjni/CMakeLists.txt index dd1ced88a49..f8fa27c5a97 100644 --- a/ReactAndroid/src/main/jni/first-party/fbjni/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/first-party/fbjni/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_library(fbjni SHARED IMPORTED GLOBAL) diff --git a/ReactAndroid/src/main/jni/first-party/hermes/CMakeLists.txt b/ReactAndroid/src/main/jni/first-party/hermes/CMakeLists.txt index db6da1e5067..4bfbaa1c863 100644 --- a/ReactAndroid/src/main/jni/first-party/hermes/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/first-party/hermes/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_library(hermes SHARED IMPORTED GLOBAL) diff --git a/ReactAndroid/src/main/jni/first-party/yogajni/CMakeLists.txt b/ReactAndroid/src/main/jni/first-party/yogajni/CMakeLists.txt index 8d6dce75ce0..8f08a9977a7 100644 --- a/ReactAndroid/src/main/jni/first-party/yogajni/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/first-party/yogajni/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( @@ -12,7 +12,7 @@ add_compile_options( -frtti -O3) -file(GLOB_RECURSE yoga_SRC jni/*.cpp) +file(GLOB yoga_SRC CONFIGURE_DEPENDS jni/*.cpp) add_library(yoga SHARED ${yoga_SRC}) target_include_directories(yoga PUBLIC jni) diff --git a/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt b/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt index 4182cb4d5e0..bacaa743f2d 100644 --- a/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/react/jni/CMakeLists.txt @@ -3,12 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) # TODO Those two libraries are building against the same sources # and should probably be merged -file(GLOB reactnativejni_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +file(GLOB reactnativejni_SRC CONFIGURE_DEPENDS *.cpp) add_compile_options( -fexceptions diff --git a/ReactAndroid/src/main/jni/third-party/boost/CMakeLists.txt b/ReactAndroid/src/main/jni/third-party/boost/CMakeLists.txt index b7c8779161c..19f87862453 100644 --- a/ReactAndroid/src/main/jni/third-party/boost/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/third-party/boost/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) # These ASM files are picked from the boost release separately, @@ -12,6 +12,7 @@ set(CMAKE_VERBOSE_MAKEFILE on) ENABLE_LANGUAGE(ASM) file(GLOB_RECURSE boostasm_SRC + CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/asm/${ANDROID_ABI}/*.S) add_library(boost STATIC ${boostasm_SRC}) diff --git a/ReactAndroid/src/main/jni/third-party/double-conversion/CMakeLists.txt b/ReactAndroid/src/main/jni/third-party/double-conversion/CMakeLists.txt index bc279fbe874..d32b34c5bf6 100644 --- a/ReactAndroid/src/main/jni/third-party/double-conversion/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/third-party/double-conversion/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-Wno-unused-variable -Wno-unused-local-typedefs) diff --git a/ReactAndroid/src/main/jni/third-party/fmt/CMakeLists.txt b/ReactAndroid/src/main/jni/third-party/fmt/CMakeLists.txt index 1791e7dc833..3c03de22fc4 100644 --- a/ReactAndroid/src/main/jni/third-party/fmt/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/third-party/fmt/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-std=c++11 -fexceptions) diff --git a/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt b/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt index 5048c7ef4ca..7b06ec29819 100644 --- a/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) SET(folly_FLAGS diff --git a/ReactAndroid/src/main/jni/third-party/glog/CMakeLists.txt b/ReactAndroid/src/main/jni/third-party/glog/CMakeLists.txt index 66a4a426520..4f07a4ef51d 100644 --- a/ReactAndroid/src/main/jni/third-party/glog/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/third-party/glog/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( diff --git a/ReactAndroid/src/main/jni/third-party/jsc/CMakeLists.txt b/ReactAndroid/src/main/jni/third-party/jsc/CMakeLists.txt index 93c3d11a507..4f72ace845c 100644 --- a/ReactAndroid/src/main/jni/third-party/jsc/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/third-party/jsc/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_library(jsc SHARED IMPORTED GLOBAL) diff --git a/ReactAndroid/src/main/jni/third-party/libevent/CMakeLists.txt b/ReactAndroid/src/main/jni/third-party/libevent/CMakeLists.txt index d729f409b34..964111f13cf 100644 --- a/ReactAndroid/src/main/jni/third-party/libevent/CMakeLists.txt +++ b/ReactAndroid/src/main/jni/third-party/libevent/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( diff --git a/ReactCommon/butter/CMakeLists.txt b/ReactCommon/butter/CMakeLists.txt index 4bc2a762941..f0369712e43 100644 --- a/ReactCommon/butter/CMakeLists.txt +++ b/ReactCommon/butter/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( @@ -13,17 +13,8 @@ add_compile_options( -std=c++17 -Wall) -add_library(butter - SHARED - butter.h - map.h - mutex.h - set.h - small_vector.h - ) +add_library(butter INTERFACE) -set_target_properties(butter PROPERTIES LINKER_LANGUAGE CXX) +target_include_directories(butter INTERFACE .) -target_include_directories(butter PUBLIC .) - -target_link_libraries(butter glog) +target_link_libraries(butter INTERFACE glog) diff --git a/ReactCommon/callinvoker/CMakeLists.txt b/ReactCommon/callinvoker/CMakeLists.txt index ab6716c0b2c..58da1e6a1f0 100644 --- a/ReactCommon/callinvoker/CMakeLists.txt +++ b/ReactCommon/callinvoker/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall) diff --git a/ReactCommon/cxxreact/CMakeLists.txt b/ReactCommon/cxxreact/CMakeLists.txt index bb224989f42..ace8f7c982c 100644 --- a/ReactCommon/cxxreact/CMakeLists.txt +++ b/ReactCommon/cxxreact/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( @@ -12,7 +12,7 @@ add_compile_options( -Wno-unused-lambda-capture -DLOG_TAG=\"ReactNative\") -file(GLOB reactnative_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +file(GLOB reactnative_SRC CONFIGURE_DEPENDS *.cpp) add_library(reactnative STATIC ${reactnative_SRC}) target_include_directories(reactnative PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/jsi/CMakeLists.txt b/ReactCommon/jsi/CMakeLists.txt index 07901bae401..d4bf231143e 100644 --- a/ReactCommon/jsi/CMakeLists.txt +++ b/ReactCommon/jsi/CMakeLists.txt @@ -7,7 +7,7 @@ ### jsi ### ################## -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( @@ -17,7 +17,7 @@ add_compile_options( -Wno-unused-lambda-capture -DLOG_TAG=\"ReactNative\") -file(GLOB jsi_SRC ${CMAKE_CURRENT_SOURCE_DIR}/jsi/*.cpp) +file(GLOB jsi_SRC CONFIGURE_DEPENDS jsi/*.cpp) add_library(jsi SHARED ${jsi_SRC}) target_include_directories(jsi PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ReactCommon/jsiexecutor/CMakeLists.txt b/ReactCommon/jsiexecutor/CMakeLists.txt index 5964a7e5e9b..50f922c7217 100644 --- a/ReactCommon/jsiexecutor/CMakeLists.txt +++ b/ReactCommon/jsiexecutor/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -O3) diff --git a/ReactCommon/jsinspector/CMakeLists.txt b/ReactCommon/jsinspector/CMakeLists.txt index c349ca9fff2..511afcb9a43 100644 --- a/ReactCommon/jsinspector/CMakeLists.txt +++ b/ReactCommon/jsinspector/CMakeLists.txt @@ -3,13 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions) -add_library(jsinspector - SHARED - InspectorInterfaces.cpp) +file(GLOB jsinspector_SRC CONFIGURE_DEPENDS *.cpp) +add_library(jsinspector SHARED ${jsinspector_SRC}) target_include_directories(jsinspector PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/logger/CMakeLists.txt b/ReactCommon/logger/CMakeLists.txt index aa572387e71..4746c147ac3 100644 --- a/ReactCommon/logger/CMakeLists.txt +++ b/ReactCommon/logger/CMakeLists.txt @@ -3,14 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions) -add_library(logger - SHARED - react_native_log.cpp) +file(GLOB logger_SRC CONFIGURE_DEPENDS *.cpp) +add_library(logger SHARED ${logger_SRC}) target_include_directories(logger PUBLIC .) diff --git a/ReactCommon/react/config/CMakeLists.txt b/ReactCommon/react/config/CMakeLists.txt index 92c9a44b089..fea8855cb9c 100644 --- a/ReactCommon/react/config/CMakeLists.txt +++ b/ReactCommon/react/config/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( @@ -13,8 +13,7 @@ add_compile_options( -Wall -DLOG_TAG=\"Fabric\") -add_library(react_config - SHARED - ReactNativeConfig.cpp) +file(GLOB react_config_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_config SHARED ${react_config_SRC}) target_include_directories(react_config PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/debug/CMakeLists.txt b/ReactCommon/react/debug/CMakeLists.txt index 8814f328a9c..7c92d79cd9c 100644 --- a/ReactCommon/react/debug/CMakeLists.txt +++ b/ReactCommon/react/debug/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( @@ -13,10 +13,11 @@ add_compile_options( -Wall -DLOG_TAG=\"Fabric\") -add_library(react_debug - SHARED - react_native_assert.cpp) +file(GLOB react_debug_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_debug SHARED ${react_debug_SRC}) + +# TODO This should not be ../../.. but a proper variable target_include_directories(react_debug PUBLIC ../../..) target_link_libraries(react_debug log folly_json) diff --git a/ReactCommon/react/nativemodule/core/CMakeLists.txt b/ReactCommon/react/nativemodule/core/CMakeLists.txt index a1930c387ee..1239bb17712 100644 --- a/ReactCommon/react/nativemodule/core/CMakeLists.txt +++ b/ReactCommon/react/nativemodule/core/CMakeLists.txt @@ -3,20 +3,18 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"ReactNative\") + +file(GLOB react_nativemodule_core_SRC CONFIGURE_DEPENDS + ReactCommon/*.cpp + platform/android/ReactCommon/*.cpp) add_library(react_nativemodule_core SHARED - ReactCommon/LongLivedObject.cpp - ReactCommon/TurboCxxModule.cpp - ReactCommon/TurboModule.cpp - ReactCommon/TurboModuleBinding.cpp - ReactCommon/TurboModulePerfLogger.cpp - ReactCommon/TurboModuleUtils.cpp - platform/android/ReactCommon/JavaTurboModule.cpp) + ${react_nativemodule_core_SRC}) target_include_directories(react_nativemodule_core PUBLIC diff --git a/ReactCommon/react/renderer/animations/CMakeLists.txt b/ReactCommon/react/renderer/animations/CMakeLists.txt index ccb5f6e5e21..9d325d51d31 100644 --- a/ReactCommon/react/renderer/animations/CMakeLists.txt +++ b/ReactCommon/react/renderer/animations/CMakeLists.txt @@ -3,18 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - react_render_animations - SHARED - LayoutAnimationDriver.cpp - LayoutAnimationKeyFrameManager.cpp - utils.cpp -) +file(GLOB react_render_animations_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_animations SHARED ${react_render_animations_SRC}) target_include_directories(react_render_animations PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/attributedstring/CMakeLists.txt b/ReactCommon/react/renderer/attributedstring/CMakeLists.txt index 4566deac13f..decca1b6310 100644 --- a/ReactCommon/react/renderer/attributedstring/CMakeLists.txt +++ b/ReactCommon/react/renderer/attributedstring/CMakeLists.txt @@ -3,19 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - react_render_attributedstring - SHARED - AttributedString.cpp - AttributedStringBox.cpp - ParagraphAttributes.cpp - TextAttributes.cpp -) +file(GLOB react_render_attributedstring_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_attributedstring SHARED ${react_render_attributedstring_SRC}) target_include_directories(react_render_attributedstring PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/componentregistry/CMakeLists.txt b/ReactCommon/react/renderer/componentregistry/CMakeLists.txt index b4543e023fa..8b924260dfd 100644 --- a/ReactCommon/react/renderer/componentregistry/CMakeLists.txt +++ b/ReactCommon/react/renderer/componentregistry/CMakeLists.txt @@ -3,18 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - react_render_componentregistry - SHARED - ComponentDescriptorProviderRegistry.cpp - ComponentDescriptorRegistry.cpp - componentNameByReactViewName.cpp -) +file(GLOB react_render_componentregistry_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_componentregistry SHARED ${react_render_componentregistry_SRC}) target_include_directories(react_render_componentregistry PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt b/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt index b6139a015c4..89c0792c4bf 100644 --- a/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt +++ b/ReactCommon/react/renderer/componentregistry/native/CMakeLists.txt @@ -3,16 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - rrc_native - SHARED - NativeComponentRegistryBinding.cpp -) +file(GLOB rrc_native_SRC CONFIGURE_DEPENDS *.cpp) +add_library(rrc_native SHARED ${rrc_native_SRC}) target_include_directories(rrc_native PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/components/image/CMakeLists.txt b/ReactCommon/react/renderer/components/image/CMakeLists.txt index b750754849f..49b8030a4a1 100644 --- a/ReactCommon/react/renderer/components/image/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/image/CMakeLists.txt @@ -3,19 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - rrc_image - SHARED - ImageEventEmitter.cpp - ImageProps.cpp - ImageShadowNode.cpp - ImageState.cpp -) +file(GLOB rrc_image_SRC CONFIGURE_DEPENDS *.cpp) +add_library(rrc_image SHARED ${rrc_image_SRC}) target_include_directories(rrc_image PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/components/root/CMakeLists.txt b/ReactCommon/react/renderer/components/root/CMakeLists.txt index 9b96943ae91..2da824a8ece 100644 --- a/ReactCommon/react/renderer/components/root/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/root/CMakeLists.txt @@ -3,14 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library(rrc_root SHARED - RootProps.cpp - RootShadowNode.cpp) +file(GLOB rrc_root_SRC CONFIGURE_DEPENDS *.cpp) +add_library(rrc_root SHARED ${rrc_root_SRC}) target_include_directories(rrc_root PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt b/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt index ab7d8a267f2..5d64f56ab05 100644 --- a/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/scrollview/CMakeLists.txt @@ -3,19 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - rrc_scrollview - SHARED - ScrollViewEventEmitter.cpp - ScrollViewProps.cpp - ScrollViewShadowNode.cpp - ScrollViewState.cpp -) +file(GLOB rrc_scrollview_SRC CONFIGURE_DEPENDS *.cpp) +add_library(rrc_scrollview SHARED ${rrc_scrollview_SRC}) target_include_directories(rrc_scrollview PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/components/text/CMakeLists.txt b/ReactCommon/react/renderer/components/text/CMakeLists.txt index 7c4eb29c6d2..404c5d429e8 100644 --- a/ReactCommon/react/renderer/components/text/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/text/CMakeLists.txt @@ -3,25 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - rrc_text - SHARED - BaseTextProps.cpp - BaseTextShadowNode.cpp - ParagraphEventEmitter.cpp - ParagraphProps.cpp - ParagraphShadowNode.cpp - ParagraphState.cpp - RawTextProps.cpp - RawTextShadowNode.cpp - TextProps.cpp - TextShadowNode.cpp -) +file(GLOB rrc_text_SRC CONFIGURE_DEPENDS *.cpp) +add_library(rrc_text SHARED ${rrc_text_SRC}) target_include_directories(rrc_text PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/components/textinput/CMakeLists.txt b/ReactCommon/react/renderer/components/textinput/CMakeLists.txt index bce6220cbba..cd91ccf67ce 100644 --- a/ReactCommon/react/renderer/components/textinput/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/textinput/CMakeLists.txt @@ -3,18 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - rrc_textinput - SHARED - androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp - androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp - androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp -) +file(GLOB rrc_textinput_SRC CONFIGURE_DEPENDS androidtextinput/react/renderer/components/androidtextinput/*.cpp) +add_library(rrc_textinput SHARED ${rrc_textinput_SRC}) target_include_directories(rrc_textinput PUBLIC diff --git a/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt b/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt index 7c2cdf823e9..0093c01eab2 100644 --- a/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/unimplementedview/CMakeLists.txt @@ -3,18 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - rrc_unimplementedview - SHARED - UnimplementedViewComponentDescriptor.cpp - UnimplementedViewProps.cpp - UnimplementedViewShadowNode.cpp -) +file(GLOB rrc_unimplementedview_SRC CONFIGURE_DEPENDS *.cpp) +add_library(rrc_unimplementedview SHARED ${rrc_unimplementedview_SRC}) target_include_directories(rrc_unimplementedview PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/components/view/CMakeLists.txt b/ReactCommon/react/renderer/components/view/CMakeLists.txt index 5a9d0cdaf11..f11b2077112 100644 --- a/ReactCommon/react/renderer/components/view/CMakeLists.txt +++ b/ReactCommon/react/renderer/components/view/CMakeLists.txt @@ -3,13 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -file(GLOB rrc_view_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) - +file(GLOB rrc_view_SRC CONFIGURE_DEPENDS *.cpp) add_library(rrc_view SHARED ${rrc_view_SRC}) target_include_directories(rrc_view PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/core/CMakeLists.txt b/ReactCommon/react/renderer/core/CMakeLists.txt index 23e0d9a8a84..c63d82f867a 100644 --- a/ReactCommon/react/renderer/core/CMakeLists.txt +++ b/ReactCommon/react/renderer/core/CMakeLists.txt @@ -3,13 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -file(GLOB react_render_core_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) - +file(GLOB react_render_core_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_core SHARED ${react_render_core_SRC}) target_include_directories(react_render_core PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/debug/CMakeLists.txt b/ReactCommon/react/renderer/debug/CMakeLists.txt index c191207c5d9..04bda64b346 100644 --- a/ReactCommon/react/renderer/debug/CMakeLists.txt +++ b/ReactCommon/react/renderer/debug/CMakeLists.txt @@ -3,15 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library(react_render_debug - SHARED - DebugStringConvertible.cpp - DebugStringConvertibleItem.cpp) +file(GLOB react_render_debug_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_debug SHARED ${react_render_debug_SRC}) target_include_directories(react_render_debug PUBLIC ${REACT_COMMON_DIR}) target_link_libraries(react_render_debug folly_json) diff --git a/ReactCommon/react/renderer/graphics/CMakeLists.txt b/ReactCommon/react/renderer/graphics/CMakeLists.txt index 9a455bb5eac..a566f9b1c2f 100644 --- a/ReactCommon/react/renderer/graphics/CMakeLists.txt +++ b/ReactCommon/react/renderer/graphics/CMakeLists.txt @@ -3,16 +3,18 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +file(GLOB react_render_graphics_SRC CONFIGURE_DEPENDS + *.cpp + platform/cxx/react/renderer/graphics/*.cpp) + add_library(react_render_graphics SHARED - Transform.cpp - platform/cxx/react/renderer/graphics/Color.cpp - ) + ${react_render_graphics_SRC}) target_include_directories(react_render_graphics PUBLIC diff --git a/ReactCommon/react/renderer/imagemanager/CMakeLists.txt b/ReactCommon/react/renderer/imagemanager/CMakeLists.txt index d48d66c2854..a53133c95e2 100644 --- a/ReactCommon/react/renderer/imagemanager/CMakeLists.txt +++ b/ReactCommon/react/renderer/imagemanager/CMakeLists.txt @@ -3,18 +3,18 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +file(GLOB react_render_imagemanager_SRC CONFIGURE_DEPENDS + *.cpp + platform/cxx/react/renderer/imagemanager/*.cpp) + add_library(react_render_imagemanager SHARED - ImageResponse.cpp - ImageResponseObserverCoordinator.cpp - ImageTelemetry.cpp - platform/cxx/react/renderer/imagemanager/ImageManager.cpp - platform/cxx/react/renderer/imagemanager/ImageRequest.cpp) + ${react_render_imagemanager_SRC}) target_include_directories(react_render_imagemanager PUBLIC diff --git a/ReactCommon/react/renderer/leakchecker/CMakeLists.txt b/ReactCommon/react/renderer/leakchecker/CMakeLists.txt index 9909bcfc2e9..d7657198d94 100644 --- a/ReactCommon/react/renderer/leakchecker/CMakeLists.txt +++ b/ReactCommon/react/renderer/leakchecker/CMakeLists.txt @@ -3,15 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library(react_render_leakchecker - SHARED - LeakChecker.cpp - WeakFamilyRegistry.cpp) +file(GLOB react_render_leakchecker_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_leakchecker SHARED ${react_render_leakchecker_SRC}) target_include_directories(react_render_leakchecker PUBLIC ${REACT_COMMON_DIR}) target_link_libraries(react_render_leakchecker diff --git a/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt b/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt index 930d0a363b7..fe3648152f5 100644 --- a/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt +++ b/ReactCommon/react/renderer/mapbuffer/CMakeLists.txt @@ -3,15 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library(react_render_mapbuffer - SHARED - MapBuffer.cpp - MapBufferBuilder.cpp) +file(GLOB react_render_mapbuffer_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_mapbuffer SHARED ${react_render_mapbuffer_SRC}) target_include_directories(react_render_mapbuffer PUBLIC ${REACT_COMMON_DIR}) target_link_libraries(react_render_mapbuffer glog glog_init react_debug) diff --git a/ReactCommon/react/renderer/mounting/CMakeLists.txt b/ReactCommon/react/renderer/mounting/CMakeLists.txt index 5cc54258ab1..6b6209a24a3 100644 --- a/ReactCommon/react/renderer/mounting/CMakeLists.txt +++ b/ReactCommon/react/renderer/mounting/CMakeLists.txt @@ -3,13 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -file(GLOB react_render_mounting_SRC ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) - +file(GLOB react_render_mounting_SRC CONFIGURE_DEPENDS *.cpp) add_library(react_render_mounting SHARED ${react_render_mounting_SRC}) target_include_directories(react_render_mounting PRIVATE .) diff --git a/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt b/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt index 3d089d91473..5a18fb85c09 100644 --- a/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +++ b/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt @@ -3,18 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - react_render_runtimescheduler - SHARED - RuntimeScheduler.cpp - RuntimeSchedulerBinding.cpp - RuntimeSchedulerCallInvoker.cpp - Task.cpp) +file(GLOB react_render_runtimescheduler_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_runtimescheduler SHARED ${react_render_runtimescheduler_SRC}) target_include_directories(react_render_runtimescheduler PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/scheduler/CMakeLists.txt b/ReactCommon/react/renderer/scheduler/CMakeLists.txt index 9a4b7fee93f..260e40cba8b 100644 --- a/ReactCommon/react/renderer/scheduler/CMakeLists.txt +++ b/ReactCommon/react/renderer/scheduler/CMakeLists.txt @@ -3,21 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library( - react_render_scheduler - SHARED - AsynchronousEventBeat.cpp - Scheduler.cpp - SchedulerToolbox.cpp - SurfaceHandler.cpp - SurfaceManager.cpp - SynchronousEventBeat.cpp -) +file(GLOB react_render_scheduler_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_scheduler SHARED ${react_render_scheduler_SRC}) target_include_directories(react_render_scheduler PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/telemetry/CMakeLists.txt b/ReactCommon/react/renderer/telemetry/CMakeLists.txt index b1d04a0e542..bcbbf0b82f2 100644 --- a/ReactCommon/react/renderer/telemetry/CMakeLists.txt +++ b/ReactCommon/react/renderer/telemetry/CMakeLists.txt @@ -3,15 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library(react_render_telemetry - SHARED - SurfaceTelemetry.cpp - TransactionTelemetry.cpp) +file(GLOB react_render_telemetry_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_telemetry SHARED ${react_render_telemetry_SRC}) target_include_directories(react_render_telemetry PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt b/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt index 5f77bbdd532..07d119ceacb 100644 --- a/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt +++ b/ReactCommon/react/renderer/templateprocessor/CMakeLists.txt @@ -3,14 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library(react_render_templateprocessor - SHARED - UITemplateProcessor.cpp) +file(GLOB react_render_templateprocessor_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_templateprocessor SHARED ${react_render_templateprocessor_SRC}) target_include_directories(react_render_templateprocessor PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt b/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt index c0e56031471..2098cbe60a8 100644 --- a/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt +++ b/ReactCommon/react/renderer/textlayoutmanager/CMakeLists.txt @@ -3,16 +3,18 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") +file(GLOB react_render_textlayourmanager_SRC CONFIGURE_DEPENDS + *.cpp + platform/android/react/renderer/textlayoutmanager/*.cpp) + add_library(react_render_textlayoutmanager SHARED - TextMeasureCache.cpp - platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp -) + ${react_render_textlayourmanager_SRC}) target_include_directories(react_render_textlayoutmanager PUBLIC diff --git a/ReactCommon/react/renderer/uimanager/CMakeLists.txt b/ReactCommon/react/renderer/uimanager/CMakeLists.txt index 03cf17135da..42433e50292 100644 --- a/ReactCommon/react/renderer/uimanager/CMakeLists.txt +++ b/ReactCommon/react/renderer/uimanager/CMakeLists.txt @@ -3,17 +3,13 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall -DLOG_TAG=\"Fabric\") -add_library(react_render_uimanager - SHARED - bindingUtils.cpp - SurfaceRegistryBinding.cpp - UIManager.cpp - UIManagerBinding.cpp) +file(GLOB react_render_uimanager_SRC CONFIGURE_DEPENDS *.cpp) +add_library(react_render_uimanager SHARED ${react_render_uimanager_SRC}) target_include_directories(react_render_uimanager PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/react/utils/CMakeLists.txt b/ReactCommon/react/utils/CMakeLists.txt index 8476c5c4e3e..8462de422a0 100644 --- a/ReactCommon/react/utils/CMakeLists.txt +++ b/ReactCommon/react/utils/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options( @@ -13,10 +13,8 @@ add_compile_options( -Wall -DLOG_TAG=\"Fabric\") -add_library(react_utils - SHARED - ManagedObjectWrapper.mm - RunLoopObserver.cpp) +file(GLOB react_utils_SRC CONFIGURE_DEPENDS *.cpp *.mm) +add_library(react_utils SHARED ${react_utils_SRC}) target_include_directories(react_utils PUBLIC ${REACT_COMMON_DIR}) diff --git a/ReactCommon/reactperflogger/CMakeLists.txt b/ReactCommon/reactperflogger/CMakeLists.txt index 257f0b2cc69..5c18745cc57 100644 --- a/ReactCommon/reactperflogger/CMakeLists.txt +++ b/ReactCommon/reactperflogger/CMakeLists.txt @@ -3,13 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall) -add_library(reactperflogger - STATIC - reactperflogger/BridgeNativeModulePerfLogger.cpp) +file(GLOB reactperflogger_SRC CONFIGURE_DEPENDS reactperflogger/*.cpp) +add_library(reactperflogger STATIC ${reactperflogger_SRC}) target_include_directories(reactperflogger PUBLIC .) diff --git a/ReactCommon/runtimeexecutor/CMakeLists.txt b/ReactCommon/runtimeexecutor/CMakeLists.txt index 86af520bd86..037d7ec3b7e 100644 --- a/ReactCommon/runtimeexecutor/CMakeLists.txt +++ b/ReactCommon/runtimeexecutor/CMakeLists.txt @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -std=c++17 -Wall) diff --git a/ReactCommon/yoga/CMakeLists.txt b/ReactCommon/yoga/CMakeLists.txt index 353fc79617c..c7e6cd4fd23 100644 --- a/ReactCommon/yoga/CMakeLists.txt +++ b/ReactCommon/yoga/CMakeLists.txt @@ -3,12 +3,12 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -cmake_minimum_required(VERSION 3.4.1) +cmake_minimum_required(VERSION 3.13) set(CMAKE_VERBOSE_MAKEFILE on) add_compile_options(-fexceptions -frtti -O3 -Wall) -file(GLOB_RECURSE yogacore_SRC yoga/*.cpp) +file(GLOB_RECURSE yogacore_SRC CONFIGURE_DEPENDS yoga/*.cpp) add_library(yogacore STATIC ${yogacore_SRC}) target_include_directories(yogacore PUBLIC .)