diff --git a/0_cmake_library/register/with_qt.cmake b/0_cmake_library/register/with_qt.cmake index 09cd72d..f78b000 100644 --- a/0_cmake_library/register/with_qt.cmake +++ b/0_cmake_library/register/with_qt.cmake @@ -22,8 +22,69 @@ block() rcl_cmake_library_set_cmake_options(global ElaWidgetTools ${ElaWidgetTools_opts}) - - - - + # 该库可以取代 QPainter 提供更好的性能 + set(asmjit_opts ${base_options}) + list(APPEND asmjit_opts + -DASMJIT_STATIC=ON + -DASMJIT_EMBED=OFF + -DASMJIT_TEST=OFF + -DASMJIT_NO_FOREIGN=ON + ) + _register_git_cmake_library(global + asmjit + "https://github.com/asmjit/asmjit.git" + "master" + ) + rcl_cmake_library_set_cmake_options(global asmjit ${asmjit_opts}) + rcl_get_effective_install_dir(global asmjit ASMJIT_ROOT) + set(ASMJIT_CMAKE_DIR "${ASMJIT_ROOT}/lib/cmake/asmjit") + rcl_cmake_library_set_other_use_opt(global asmjit + "-Dasmjit_ROOT=\"${ASMJIT_ROOT}\"" + "-Dasmjit_DIR=\"${ASMJIT_CMAKE_DIR}\"" + ) + rcl_cmake_library_set_init_script(global asmjit + "set(asmjit_ROOT \"${ASMJIT_ROOT}\")" + "set(asmjit_DIR \"${ASMJIT_CMAKE_DIR}\")" + "find_package(asmjit CONFIG REQUIRED)" + ) + rcl_cmake_library_set_clear_script(global asmjit + "unset(asmjit_ROOT)" + "unset(asmjit_DIR)" + ) + set(Blend2D_opts ${base_options}) + list(APPEND Blend2D_opts + -DBLEND2D_STATIC=ON + -DBLEND2D_TEST=OFF + -DBLEND2D_DEMOS=OFF + -DBLEND2D_NO_JIT=OFF + -DBLEND2D_NO_INSTALL=OFF + -DBLEND2D_EXTERNAL_ASMJIT=ON + -DBLEND2D_NO_STDCXX=OFF + "-Dasmjit_DIR=\"${ASMJIT_CMAKE_DIR}\"" + ) + _register_git_cmake_library(global + blend2d + "https://github.com/blend2d/blend2d.git" + "master" + ) + rcl_cmake_library_set_cmake_options(global blend2d ${Blend2D_opts}) + rcl_cmake_library_set_deps(global blend2d asmjit) + rcl_get_effective_install_dir(global blend2d BLEND2D_ROOT) + set(BLEND2D_CMAKE_DIR "${BLEND2D_ROOT}/lib/cmake/blend2d") + rcl_cmake_library_set_other_use_opt(global blend2d + "-Dblend2d_ROOT=\"${BLEND2D_ROOT}\"" + "-Dblend2d_DIR=\"${BLEND2D_CMAKE_DIR}\"" + "-Dasmjit_DIR=\"${ASMJIT_CMAKE_DIR}\"" + ) + rcl_cmake_library_set_init_script(global blend2d + "set(asmjit_DIR \"${ASMJIT_CMAKE_DIR}\")" + "set(blend2d_ROOT \"${BLEND2D_ROOT}\")" + "set(blend2d_DIR \"${BLEND2D_CMAKE_DIR}\")" + "find_package(blend2d CONFIG REQUIRED)" + ) + rcl_cmake_library_set_clear_script(global blend2d + "unset(asmjit_DIR)" + "unset(blend2d_ROOT)" + "unset(blend2d_DIR)" + ) endblock() \ No newline at end of file