Project structure rearrangement
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Submodules/SDL" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Submodules/skia" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Submodules/tinyxml2" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Submodules/vcpkg" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Submodules/yoga" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,54 +1,175 @@
|
||||
cmake_minimum_required(VERSION 3.29)
|
||||
project(UIKit)
|
||||
|
||||
# toolchain
|
||||
set(EXTERN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Submodules)
|
||||
include(${EXTERN_PATH}/cmake/toolchain.cmake)
|
||||
|
||||
project(ThorVGApp)
|
||||
set(VERSION_MAJOR "0")
|
||||
set(VERSION_MINOR "0")
|
||||
set(VERSION_ALTER "1")
|
||||
set(VERSION_BUILD "1")
|
||||
set(PACKAGE_NAME "ru.xitrix.skiatest")
|
||||
set(PSN_VERSION "01.00")
|
||||
set(PROJECT_AUTHOR "XITRIX")
|
||||
set(PROJECT_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/img/moonlight_icon.jpg)
|
||||
set(PROJECT_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/resources)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
add_libromfs(${PROJECT_NAME} ${PROJECT_RESOURCES})
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
app/main.cpp
|
||||
app/AppDelegate.cpp
|
||||
app/Screens/TestViewController/TestViewController.cpp
|
||||
app/Screens/YogaTestViewController/YogaTestViewController.cpp
|
||||
app/Screens/IBTestController/IBTestController.cpp
|
||||
app/Screens/NXTextScreen/NXNavigationController.cpp
|
||||
app/Screens/NXTextScreen/NXTabBarController.cpp
|
||||
add_definitions(
|
||||
-DSK_TRIVIAL_ABI=[[clang::trivial_abi]]
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
app
|
||||
add_library(UIKit
|
||||
UIKitCore/lib/tools/Logger.cpp
|
||||
UIKitCore/lib/tools/IBTools.cpp
|
||||
UIKitCore/lib/tools/Fatal.cpp
|
||||
UIKitCore/lib/tools/Tools.cpp
|
||||
UIKitCore/lib/CABasicAnimation.cpp
|
||||
UIKitCore/lib/CABasicAnimationPrototype.cpp
|
||||
UIKitCore/lib/CABlurLayer.cpp
|
||||
UIKitCore/lib/CASpringAnimation.cpp
|
||||
UIKitCore/lib/CASpringAnimationPrototype.cpp
|
||||
UIKitCore/lib/CAMediaTimingFunction.cpp
|
||||
UIKitCore/lib/CATextLayer.cpp
|
||||
UIKitCore/lib/CATransaction.cpp
|
||||
UIKitCore/lib/ContentsGravityTransformation.cpp
|
||||
UIKitCore/lib/platforms/SkiaCtx.cpp
|
||||
UIKitCore/lib/Application.cpp
|
||||
UIKitCore/lib/DispatchQueue.cpp
|
||||
UIKitCore/lib/Timer.cpp
|
||||
UIKitCore/lib/Geometry.cpp
|
||||
UIKitCore/lib/IndexPath.cpp
|
||||
UIKitCore/lib/CGImage.cpp
|
||||
UIKitCore/lib/CADisplayLink.cpp
|
||||
UIKitCore/lib/CALayer.cpp
|
||||
UIKitCore/lib/YGLayout.cpp
|
||||
UIKitCore/lib/UIAction.cpp
|
||||
UIKitCore/lib/UIApplication.cpp
|
||||
UIKitCore/lib/UIApplicationDelegateImpl.cpp
|
||||
UIKitCore/lib/UIApplicationMain.cpp
|
||||
UIKitCore/lib/UIBlurView.cpp
|
||||
UIKitCore/lib/UIButton.cpp
|
||||
UIKitCore/lib/UIColor.cpp
|
||||
UIKitCore/lib/UIControl.cpp
|
||||
UIKitCore/lib/UIControlGestureRecognizer.cpp
|
||||
UIKitCore/lib/UIEdgeInsets.cpp
|
||||
UIKitCore/lib/UIEvent.cpp
|
||||
UIKitCore/lib/UIFocus.cpp
|
||||
UIKitCore/lib/UIFocusAnimationCoordinator.cpp
|
||||
UIKitCore/lib/UIFocusSystem.cpp
|
||||
UIKitCore/lib/UIGestureRecognizer.cpp
|
||||
UIKitCore/lib/UIImage.cpp
|
||||
UIKitCore/lib/UIImageView.cpp
|
||||
UIKitCore/lib/UIKey.cpp
|
||||
UIKitCore/lib/UILabel.cpp
|
||||
UIKitCore/lib/UINib.cpp
|
||||
UIKitCore/lib/UIPanGestureRecognizer.cpp
|
||||
UIKitCore/lib/UIPress.cpp
|
||||
UIKitCore/lib/UIPressesEvent.cpp
|
||||
UIKitCore/lib/UIResponder.cpp
|
||||
UIKitCore/lib/UIScrollView.cpp
|
||||
UIKitCore/lib/UITapGestureRecognizer.cpp
|
||||
UIKitCore/lib/UITouch.cpp
|
||||
UIKitCore/lib/UITraitCollection.cpp
|
||||
UIKitCore/lib/UITraitEnvironment.cpp
|
||||
UIKitCore/lib/UIView.cpp
|
||||
UIKitCore/lib/UIViewAnimationGroup.cpp
|
||||
UIKitCore/lib/UIViewAnimationOptions.cpp
|
||||
UIKitCore/lib/UIViewController.cpp
|
||||
UIKitCore/lib/UIWindow.cpp
|
||||
UIKitCore/lib/NXAffineTransform.cpp
|
||||
UIKitCore/lib/NXTransform3D.cpp
|
||||
UIKitCore/lib/NXData.cpp
|
||||
UIKitCore/lib/UIScrollViewExtensions/DecelerationTimingParameters.cpp
|
||||
UIKitCore/lib/UIScrollViewExtensions/RubberBand.cpp
|
||||
UIKitCore/lib/UIScrollViewExtensions/SpringTimingParameters.cpp
|
||||
UIKitCore/lib/UIScrollViewExtensions/TimerAnimation.cpp
|
||||
UIKitCore/lib/SkTools/EventTracingPriv.cpp
|
||||
UIKitCore/lib/SkTools/SkDebugfTracer.cpp
|
||||
)
|
||||
|
||||
setup_project()
|
||||
list(APPEND platform_libs yogacore tinyxml2)
|
||||
target_include_directories(UIKit PUBLIC ${EXTERN_PATH}/yoga)
|
||||
target_include_directories(UIKit PUBLIC ${EXTERN_PATH}/tinyxml2)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
UIKit
|
||||
# APPLE
|
||||
if (APPLE)
|
||||
target_sources(UIKit PRIVATE
|
||||
UIKitCore/lib/platforms/SkiaCtx_sdlBase.cpp
|
||||
)
|
||||
|
||||
# MAC
|
||||
if (PLATFORM_DESKTOP)
|
||||
find_library(SDL2 NAMES SDL2-static SDL2main)
|
||||
|
||||
list(APPEND platform_libs
|
||||
SDL2-static SDL2main
|
||||
${EXTERN_PATH}/skia/out/mac-arm64-angle/libskia.a
|
||||
${EXTERN_PATH}/skia/out/mac-arm64-angle/libskparagraph.a
|
||||
${EXTERN_PATH}/skia/out/mac-arm64-angle/libskshaper.a
|
||||
${EXTERN_PATH}/skia/out/mac-arm64-angle/libskunicode_core.a
|
||||
${EXTERN_PATH}/skia/out/mac-arm64-angle/libskunicode_icu.a
|
||||
${EXTERN_PATH}/skia/out/mac-arm64-angle/libicu.a
|
||||
)
|
||||
|
||||
target_sources(UIKit PRIVATE
|
||||
UIKitCore/lib/platforms/apple/macos/SkiaCtx_macos.mm
|
||||
)
|
||||
# IOS
|
||||
elseif (PLATFORM_IOS)
|
||||
find_library(SDL2 NAMES SDL2-static SDL2main)
|
||||
|
||||
list(APPEND platform_libs
|
||||
SDL2-static SDL2main
|
||||
${EXTERN_PATH}/skia/out/ios-arm64-angle/libskia.a
|
||||
${EXTERN_PATH}/skia/out/ios-arm64-angle/libskparagraph.a
|
||||
${EXTERN_PATH}/skia/out/ios-arm64-angle/libskshaper.a
|
||||
${EXTERN_PATH}/skia/out/ios-arm64-angle/libskunicode_core.a
|
||||
${EXTERN_PATH}/skia/out/ios-arm64-angle/libskunicode_icu.a
|
||||
${EXTERN_PATH}/skia/out/ios-arm64-angle/libicu.a
|
||||
)
|
||||
|
||||
target_sources(UIKit PRIVATE
|
||||
UIKitCore/lib/platforms/apple/ios/SkiaCtx_ios.mm
|
||||
)
|
||||
endif ()
|
||||
elseif (PLATFORM_SWITCH)
|
||||
target_sources(UIKit PUBLIC
|
||||
UIKitCore/lib/platforms/SkiaCtx_sdlBase.cpp
|
||||
UIKitCore/lib/platforms/switch/SkiaCtx_switch.cpp
|
||||
UIKitCore/lib/platforms/switch/switch_wrapper.c
|
||||
)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SDL2 REQUIRED sdl2)
|
||||
message(STATUS "SDL2 Path: \"${SDL2_INCLUDE_DIRS}\"")
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
# GPU
|
||||
target_link_libraries(UIKit PUBLIC EGL glapi GLESv2 drm_nouveau nx)
|
||||
|
||||
|
||||
target_link_libraries(UIKit PUBLIC
|
||||
${EXTERN_PATH}/skia/out/horizon/libskia.a
|
||||
${EXTERN_PATH}/skia/out/horizon/libskparagraph.a
|
||||
${EXTERN_PATH}/skia/out/horizon/libskshaper.a
|
||||
${EXTERN_PATH}/skia/out/horizon/libskunicode_core.a
|
||||
${EXTERN_PATH}/skia/out/horizon/libskunicode_icu.a
|
||||
${EXTERN_PATH}/skia/out/horizon/libicu.a
|
||||
${EXTERN_PATH}/skia/out/horizon/libskcms.a
|
||||
freetype
|
||||
expat
|
||||
jpeg
|
||||
png
|
||||
bz2
|
||||
z
|
||||
|
||||
|
||||
)
|
||||
endif ()
|
||||
|
||||
target_include_directories(UIKit PUBLIC
|
||||
${EXTERN_PATH}/SDL/include
|
||||
${EXTERN_PATH}/skia
|
||||
${EXTERN_PATH}/libromfs/lib/include
|
||||
UIKitCore/include
|
||||
UIKitCore/lib
|
||||
)
|
||||
|
||||
if (PLATFORM_MAC)
|
||||
target_include_directories(SDL2-static PUBLIC ${EXTERN_PATH}/angle/mac/Headers)
|
||||
elseif (PLATFORM_IOS)
|
||||
target_include_directories(SDL2-static PUBLIC ${EXTERN_PATH}/angle/ios/MetalANGLE.framework/Headers)
|
||||
endif ()
|
||||
|
||||
#list(APPEND google_angle_libs
|
||||
# ${EXTERN_PATH}/angle/mac/libEGL.dylib
|
||||
# ${EXTERN_PATH}/angle/mac/libGLESv2.dylib
|
||||
#)
|
||||
#
|
||||
#set_property(
|
||||
# SOURCE ${google_angle_libs}
|
||||
# PROPERTY MACOSX_PACKAGE_LOCATION "Frameworks"
|
||||
#)
|
||||
#
|
||||
#target_sources(${PROJECT_NAME} PRIVATE
|
||||
# ${google_angle_libs}
|
||||
#)
|
||||
if (APPLE)
|
||||
list(APPEND platform_libs "-framework Foundation" "-framework VideoToolbox" "-framework AVKit" "-framework MetalKit" "-framework CoreText")
|
||||
endif ()
|
||||
|
||||
target_link_libraries(UIKit PUBLIC fmt ${platform_libs})
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/Thirdparties/UIKit" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,39 @@
|
||||
cmake_minimum_required(VERSION 3.29)
|
||||
|
||||
# toolchain
|
||||
set(UIKIT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Thirdparty/UIKit)
|
||||
include(${UIKIT_PATH}/Submodules/cmake/toolchain.cmake)
|
||||
|
||||
project(ThorVGApp)
|
||||
set(VERSION_MAJOR "0")
|
||||
set(VERSION_MINOR "0")
|
||||
set(VERSION_ALTER "1")
|
||||
set(VERSION_BUILD "1")
|
||||
set(PACKAGE_NAME "ru.xitrix.skiatest")
|
||||
set(PSN_VERSION "01.00")
|
||||
set(PROJECT_AUTHOR "XITRIX")
|
||||
set(PROJECT_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/img/moonlight_icon.jpg)
|
||||
set(PROJECT_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/resources)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
add_libromfs(${PROJECT_NAME} ${PROJECT_RESOURCES})
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
app/main.cpp
|
||||
app/AppDelegate.cpp
|
||||
app/Screens/TestViewController/TestViewController.cpp
|
||||
app/Screens/YogaTestViewController/YogaTestViewController.cpp
|
||||
app/Screens/IBTestController/IBTestController.cpp
|
||||
app/Screens/NXTextScreen/NXNavigationController.cpp
|
||||
app/Screens/NXTextScreen/NXTabBarController.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||
app
|
||||
)
|
||||
|
||||
setup_project()
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
UIKit
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
../..
|
||||
|
Before Width: | Height: | Size: 535 KiB After Width: | Height: | Size: 535 KiB |
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 285 KiB |
|
Before Width: | Height: | Size: 535 KiB After Width: | Height: | Size: 535 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 509 KiB After Width: | Height: | Size: 509 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 398 KiB After Width: | Height: | Size: 398 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 391 KiB After Width: | Height: | Size: 391 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 778 B After Width: | Height: | Size: 778 B |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 407 KiB After Width: | Height: | Size: 407 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 222 KiB After Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |