mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Hermes executor migration to CMake
Summary: Adds CMake files to configure hermes-executor build, with the same setup as we have in Android.mk Changelog: [Internal] - CMake build config for hermes executor Reviewed By: cortinico Differential Revision: D34811909 fbshipit-source-id: 2df6dbaf46131db87a25e26c83b38ba44f29d1d3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a6095d43cd
commit
6c5bd6d790
@@ -0,0 +1,41 @@
|
||||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# 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.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
file(GLOB_RECURSE hermes_executor_SRC CONFIGURE_DEPENDS *.cpp)
|
||||
|
||||
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||
set(HERMES_TARGET_SUFFIX debug)
|
||||
else()
|
||||
set(HERMES_TARGET_SUFFIX release)
|
||||
endif()
|
||||
|
||||
set(HERMES_TARGET_NAME hermes-executor-${HERMES_TARGET_SUFFIX})
|
||||
|
||||
add_library(
|
||||
${HERMES_TARGET_NAME}
|
||||
SHARED
|
||||
${hermes_executor_SRC}
|
||||
)
|
||||
target_compile_options(
|
||||
${HERMES_TARGET_NAME}
|
||||
PRIVATE
|
||||
$<$<CONFIG:Debug>:-DHERMES_ENABLE_DEBUGGER=1>
|
||||
-fexceptions
|
||||
)
|
||||
target_include_directories(${HERMES_TARGET_NAME} PRIVATE .)
|
||||
target_link_libraries(
|
||||
${HERMES_TARGET_NAME}
|
||||
hermes-executor-common
|
||||
jsireact
|
||||
fb
|
||||
fbjni
|
||||
folly_json
|
||||
hermes-engine::libhermes
|
||||
jsi
|
||||
reactnativejni
|
||||
)
|
||||
Reference in New Issue
Block a user