2021-12-18 09:34:04 +00:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2022-10-26 09:25:52 +00:00
|
|
|
index 964a44d..3ae22ad 100644
|
2021-12-18 09:34:04 +00:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2022-10-26 09:25:52 +00:00
|
|
|
@@ -262,13 +262,13 @@ message("BUILD_WITH_MRUBY: ${BUILD_WITH_MRUBY}")
|
2021-12-18 09:34:04 +00:00
|
|
|
|
2022-10-26 09:25:52 +00:00
|
|
|
if(BUILD_WITH_MRUBY)
|
|
|
|
set(MRUBY_BUILDDIR ${CMAKE_SOURCE_DIR}/build/mruby)
|
|
|
|
- set(MRUBY_DIR ${THIRDPARTY_DIR}/mruby)
|
|
|
|
+ set(MRUBY_DIR @mruby@)
|
|
|
|
if(ANDROID)
|
|
|
|
set(MRUBY_CONFIG ${MRUBY_BUILDDIR}/tic_android.rb)
|
|
|
|
else()
|
|
|
|
set(MRUBY_CONFIG ${MRUBY_BUILDDIR}/tic_default.rb)
|
|
|
|
endif()
|
|
|
|
- set(MRUBY_LIB ${MRUBY_DIR}/build/target/lib/libmruby.a)
|
|
|
|
+ set(MRUBY_LIB ${MRUBY_DIR}/lib/libmruby.a)
|
2021-12-18 09:34:04 +00:00
|
|
|
|
2022-10-26 09:25:52 +00:00
|
|
|
if(MSVC)
|
|
|
|
set(MRUBY_TOOLCHAIN visualcpp)
|
|
|
|
@@ -286,26 +286,6 @@ if(BUILD_WITH_MRUBY)
|
|
|
|
set(MRUBY_RAKE_EXTRA_OPTS "${MRUBY_RAKE_EXTRA_OPTS} ANDROID_NDK_HOME=${ANDROID_NDK_HOME}")
|
|
|
|
endif()
|
2021-12-18 09:34:04 +00:00
|
|
|
|
2022-10-26 09:25:52 +00:00
|
|
|
- ExternalProject_Add(mruby_vendor
|
|
|
|
- SOURCE_DIR ${MRUBY_DIR}
|
|
|
|
- CONFIGURE_COMMAND ""
|
|
|
|
- BUILD_IN_SOURCE TRUE
|
|
|
|
- BUILD_COMMAND
|
|
|
|
- ${RAKE} clean all "MRUBY_CONFIG=${MRUBY_CONFIG}"
|
|
|
|
- "TARGET_CC=\"${CMAKE_C_COMPILER}\""
|
|
|
|
- "TARGET_AR=\"${CMAKE_AR}\""
|
|
|
|
- "TARGET_CFLAGS=${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BUILD_TYPE_UC}}"
|
|
|
|
- "TARGET_LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_LINKER_FLAGS_${BUILD_TYPE_UC}}"
|
|
|
|
- "BUILD_TYPE=${BUILD_TYPE_UC}"
|
|
|
|
- "MRUBY_SYSROOT=${MRUBY_SYSROOT}"
|
|
|
|
- "MRUBY_TOOLCHAIN=${MRUBY_TOOLCHAIN}"
|
|
|
|
- "ANDROID_ARCH=${CMAKE_ANDROID_ARCH_ABI}"
|
|
|
|
- "ANDROID_PLATFORM=android-${CMAKE_SYSTEM_VERSION}"
|
|
|
|
- ${MRUBY_RAKE_EXTRA_OPTS}
|
|
|
|
- INSTALL_COMMAND ""
|
|
|
|
- BUILD_BYPRODUCTS ${MRUBY_LIB}
|
|
|
|
- )
|
2021-12-18 09:34:04 +00:00
|
|
|
-
|
2022-10-26 09:25:52 +00:00
|
|
|
add_library(mruby STATIC IMPORTED GLOBAL)
|
|
|
|
set_property(TARGET mruby APPEND
|
|
|
|
PROPERTY IMPORTED_LOCATION ${MRUBY_LIB}
|
|
|
|
@@ -313,7 +293,6 @@ if(BUILD_WITH_MRUBY)
|
|
|
|
set_property(TARGET mruby APPEND
|
|
|
|
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MRUBY_DIR}/include
|
|
|
|
)
|
|
|
|
- add_dependencies(mruby mruby_vendor)
|
|
|
|
endif()
|
2021-12-18 09:34:04 +00:00
|
|
|
|
|
|
|
################################
|