diff --git a/CMakeLists.txt b/CMakeLists.txt index 964a44d..3ae22ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,13 +262,13 @@ message("BUILD_WITH_MRUBY: ${BUILD_WITH_MRUBY}") 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) 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() - 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} - ) - 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() ################################