2021-01-22 06:02:01 +03:00
|
|
|
cmake_minimum_required(VERSION 3.16)
|
2020-03-23 19:12:37 +03:00
|
|
|
project(Skyline LANGUAGES CXX ASM VERSION 0.3)
|
2019-06-29 16:35:24 +03:00
|
|
|
|
2021-01-22 06:02:01 +03:00
|
|
|
set(BUILD_TESTS OFF CACHE BOOL "Build Tests" FORCE)
|
|
|
|
set(BUILD_TESTING OFF CACHE BOOL "Build Testing" FORCE)
|
2020-03-29 22:07:11 +03:00
|
|
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libraries" FORCE)
|
|
|
|
|
2021-01-22 06:02:01 +03:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2019-07-24 23:19:43 +03:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
2020-03-29 22:07:11 +03:00
|
|
|
|
Framebuffer and NativeActivity
What was added:
* Framebuffer
* NativeActivity
* NV Services
* IOCTL Handler
* NV Devices:
* * /dev/nvmap - 0xC0080101, 0xC0080103, 0xC0200104, 0xC0180105, 0xC00C0109, 0xC008010E
* * /dev/nvhost-as-gpu
* * /dev/nvhost-channel - 0x40044801, 0xC0104809, 0xC010480B, 0xC018480C, 0x4004480D, 0xC020481A, 0x40084714
* * /dev/nvhost-ctrl
* * /dev/nvhost-ctrl-gpu - 0x80044701, 0x80284702, 0xC0184706, 0xC0B04705, 0x80084714
* SVCs:
* * SetMemoryAttribute
* * CreateTransferMemory
* * ResetSignal
* * GetSystemTick
* Addition of Compact Logger
What was fixed:
* SVCs:
* * SetHeapSize
* * SetMemoryAttribute
* * QueryMemory
* A release build would not set CMAKE_BUILD_TYPE to "RELEASE"
* The logger code was simplified
2019-11-13 23:09:31 +03:00
|
|
|
set(source_DIR ${CMAKE_SOURCE_DIR}/src/main/cpp)
|
2020-10-28 19:00:39 +03:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
|
2020-11-17 03:48:41 +03:00
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto=full -fno-stack-protector -Wno-unused-command-line-argument")
|
Framebuffer and NativeActivity
What was added:
* Framebuffer
* NativeActivity
* NV Services
* IOCTL Handler
* NV Devices:
* * /dev/nvmap - 0xC0080101, 0xC0080103, 0xC0200104, 0xC0180105, 0xC00C0109, 0xC008010E
* * /dev/nvhost-as-gpu
* * /dev/nvhost-channel - 0x40044801, 0xC0104809, 0xC010480B, 0xC018480C, 0x4004480D, 0xC020481A, 0x40084714
* * /dev/nvhost-ctrl
* * /dev/nvhost-ctrl-gpu - 0x80044701, 0x80284702, 0xC0184706, 0xC0B04705, 0x80084714
* SVCs:
* * SetMemoryAttribute
* * CreateTransferMemory
* * ResetSignal
* * GetSystemTick
* Addition of Compact Logger
What was fixed:
* SVCs:
* * SetHeapSize
* * SetMemoryAttribute
* * QueryMemory
* A release build would not set CMAKE_BUILD_TYPE to "RELEASE"
* The logger code was simplified
2019-11-13 23:09:31 +03:00
|
|
|
if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
|
|
|
|
add_compile_definitions(NDEBUG)
|
2021-01-22 06:02:01 +03:00
|
|
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
2020-09-14 16:53:40 +03:00
|
|
|
endif ()
|
Framebuffer and NativeActivity
What was added:
* Framebuffer
* NativeActivity
* NV Services
* IOCTL Handler
* NV Devices:
* * /dev/nvmap - 0xC0080101, 0xC0080103, 0xC0200104, 0xC0180105, 0xC00C0109, 0xC008010E
* * /dev/nvhost-as-gpu
* * /dev/nvhost-channel - 0x40044801, 0xC0104809, 0xC010480B, 0xC018480C, 0x4004480D, 0xC020481A, 0x40084714
* * /dev/nvhost-ctrl
* * /dev/nvhost-ctrl-gpu - 0x80044701, 0x80284702, 0xC0184706, 0xC0B04705, 0x80084714
* SVCs:
* * SetMemoryAttribute
* * CreateTransferMemory
* * ResetSignal
* * GetSystemTick
* Addition of Compact Logger
What was fixed:
* SVCs:
* * SetHeapSize
* * SetMemoryAttribute
* * QueryMemory
* A release build would not set CMAKE_BUILD_TYPE to "RELEASE"
* The logger code was simplified
2019-11-13 23:09:31 +03:00
|
|
|
|
2019-07-24 23:19:43 +03:00
|
|
|
add_subdirectory("libraries/fmt")
|
2021-01-22 06:02:01 +03:00
|
|
|
|
2020-01-02 23:19:34 +03:00
|
|
|
add_subdirectory("libraries/oboe")
|
2020-04-23 00:33:49 +03:00
|
|
|
include_directories("libraries/oboe/include")
|
2021-01-22 06:02:01 +03:00
|
|
|
|
|
|
|
set(LZ4_BUILD_CLI OFF CACHE BOOL "Build LZ4 CLI" FORCE)
|
|
|
|
add_subdirectory("libraries/lz4/build/cmake")
|
|
|
|
include_directories("libraries/lz4/lib")
|
|
|
|
|
2020-04-23 00:33:49 +03:00
|
|
|
include_directories("libraries/vkhpp/include")
|
2021-01-22 06:02:01 +03:00
|
|
|
include_directories("libraries/pugixml/src") # We use PugiXML in header-only mode
|
2020-09-17 23:38:23 +03:00
|
|
|
include_directories("libraries/frozen/include")
|
2019-07-24 23:19:43 +03:00
|
|
|
|
2020-09-14 16:53:40 +03:00
|
|
|
find_package(mbedtls REQUIRED CONFIG)
|
|
|
|
|
2019-10-13 11:04:47 +03:00
|
|
|
include_directories(${source_DIR}/skyline)
|
2019-06-29 19:13:36 +03:00
|
|
|
|
2019-09-24 23:54:27 +03:00
|
|
|
add_library(skyline SHARED
|
2020-06-19 23:18:33 +03:00
|
|
|
${source_DIR}/emu_jni.cpp
|
|
|
|
${source_DIR}/loader_jni.cpp
|
2019-09-24 23:54:27 +03:00
|
|
|
${source_DIR}/skyline/common.cpp
|
2020-11-03 12:44:09 +03:00
|
|
|
${source_DIR}/skyline/common/settings.cpp
|
|
|
|
${source_DIR}/skyline/common/signal.cpp
|
2020-01-07 05:36:08 +03:00
|
|
|
${source_DIR}/skyline/nce/guest.S
|
2019-09-24 23:54:27 +03:00
|
|
|
${source_DIR}/skyline/nce.cpp
|
2019-12-05 18:35:34 +03:00
|
|
|
${source_DIR}/skyline/jvm.cpp
|
2020-10-21 20:09:35 +03:00
|
|
|
${source_DIR}/skyline/os.cpp
|
|
|
|
${source_DIR}/skyline/kernel/memory.cpp
|
2020-12-05 20:41:52 +03:00
|
|
|
${source_DIR}/skyline/kernel/scheduler.cpp
|
2020-10-21 20:09:35 +03:00
|
|
|
${source_DIR}/skyline/kernel/ipc.cpp
|
|
|
|
${source_DIR}/skyline/kernel/svc.cpp
|
|
|
|
${source_DIR}/skyline/kernel/types/KProcess.cpp
|
|
|
|
${source_DIR}/skyline/kernel/types/KThread.cpp
|
|
|
|
${source_DIR}/skyline/kernel/types/KSharedMemory.cpp
|
|
|
|
${source_DIR}/skyline/kernel/types/KPrivateMemory.cpp
|
2021-01-11 22:17:06 +03:00
|
|
|
${source_DIR}/skyline/kernel/types/KSyncObject.cpp
|
2020-04-18 00:23:38 +03:00
|
|
|
${source_DIR}/skyline/audio.cpp
|
|
|
|
${source_DIR}/skyline/audio/track.cpp
|
|
|
|
${source_DIR}/skyline/audio/resampler.cpp
|
2020-07-07 17:35:34 +03:00
|
|
|
${source_DIR}/skyline/audio/adpcm_decoder.cpp
|
2020-10-28 19:00:39 +03:00
|
|
|
${source_DIR}/skyline/gpu/presentation_engine.cpp
|
2020-08-09 17:02:38 +03:00
|
|
|
${source_DIR}/skyline/gpu/macro_interpreter.cpp
|
2020-07-14 17:15:28 +03:00
|
|
|
${source_DIR}/skyline/gpu/memory_manager.cpp
|
2020-07-23 22:46:04 +03:00
|
|
|
${source_DIR}/skyline/gpu/gpfifo.cpp
|
2020-08-09 17:02:38 +03:00
|
|
|
${source_DIR}/skyline/gpu/syncpoint.cpp
|
2020-03-24 23:17:31 +03:00
|
|
|
${source_DIR}/skyline/gpu/texture.cpp
|
2020-08-09 17:02:38 +03:00
|
|
|
${source_DIR}/skyline/gpu/engines/maxwell_3d.cpp
|
2020-04-26 02:34:35 +03:00
|
|
|
${source_DIR}/skyline/input/npad.cpp
|
2020-05-01 00:53:45 +03:00
|
|
|
${source_DIR}/skyline/input/npad_device.cpp
|
2020-09-07 19:39:05 +03:00
|
|
|
${source_DIR}/skyline/input/touch.cpp
|
2020-10-21 20:09:35 +03:00
|
|
|
${source_DIR}/skyline/crypto/aes_cipher.cpp
|
|
|
|
${source_DIR}/skyline/crypto/key_store.cpp
|
2020-06-25 18:29:35 +03:00
|
|
|
${source_DIR}/skyline/loader/loader.cpp
|
2019-09-24 23:54:27 +03:00
|
|
|
${source_DIR}/skyline/loader/nro.cpp
|
2020-06-25 18:51:05 +03:00
|
|
|
${source_DIR}/skyline/loader/nso.cpp
|
2020-06-29 21:23:33 +03:00
|
|
|
${source_DIR}/skyline/loader/nca.cpp
|
2020-06-29 23:19:32 +03:00
|
|
|
${source_DIR}/skyline/loader/nsp.cpp
|
2020-10-21 20:09:35 +03:00
|
|
|
${source_DIR}/skyline/vfs/os_filesystem.cpp
|
|
|
|
${source_DIR}/skyline/vfs/partition_filesystem.cpp
|
|
|
|
${source_DIR}/skyline/vfs/ctr_encrypted_backing.cpp
|
|
|
|
${source_DIR}/skyline/vfs/rom_filesystem.cpp
|
|
|
|
${source_DIR}/skyline/vfs/os_backing.cpp
|
|
|
|
${source_DIR}/skyline/vfs/nacp.cpp
|
|
|
|
${source_DIR}/skyline/vfs/npdm.cpp
|
|
|
|
${source_DIR}/skyline/vfs/nca.cpp
|
Framebuffer and NativeActivity
What was added:
* Framebuffer
* NativeActivity
* NV Services
* IOCTL Handler
* NV Devices:
* * /dev/nvmap - 0xC0080101, 0xC0080103, 0xC0200104, 0xC0180105, 0xC00C0109, 0xC008010E
* * /dev/nvhost-as-gpu
* * /dev/nvhost-channel - 0x40044801, 0xC0104809, 0xC010480B, 0xC018480C, 0x4004480D, 0xC020481A, 0x40084714
* * /dev/nvhost-ctrl
* * /dev/nvhost-ctrl-gpu - 0x80044701, 0x80284702, 0xC0184706, 0xC0B04705, 0x80084714
* SVCs:
* * SetMemoryAttribute
* * CreateTransferMemory
* * ResetSignal
* * GetSystemTick
* Addition of Compact Logger
What was fixed:
* SVCs:
* * SetHeapSize
* * SetMemoryAttribute
* * QueryMemory
* A release build would not set CMAKE_BUILD_TYPE to "RELEASE"
* The logger code was simplified
2019-11-13 23:09:31 +03:00
|
|
|
${source_DIR}/skyline/services/serviceman.cpp
|
2020-09-21 13:04:26 +03:00
|
|
|
${source_DIR}/skyline/services/base_service.cpp
|
2020-03-24 23:17:31 +03:00
|
|
|
${source_DIR}/skyline/services/common/parcel.cpp
|
2020-02-16 22:11:43 +03:00
|
|
|
${source_DIR}/skyline/services/sm/IUserInterface.cpp
|
2020-02-17 17:50:53 +03:00
|
|
|
${source_DIR}/skyline/services/fatalsrv/IService.cpp
|
2020-02-17 22:11:59 +03:00
|
|
|
${source_DIR}/skyline/services/audio/IAudioOutManager.cpp
|
|
|
|
${source_DIR}/skyline/services/audio/IAudioOut.cpp
|
2020-07-09 16:48:14 +03:00
|
|
|
${source_DIR}/skyline/services/audio/IAudioDevice.cpp
|
2020-02-17 22:11:59 +03:00
|
|
|
${source_DIR}/skyline/services/audio/IAudioRendererManager.cpp
|
|
|
|
${source_DIR}/skyline/services/audio/IAudioRenderer/IAudioRenderer.cpp
|
|
|
|
${source_DIR}/skyline/services/audio/IAudioRenderer/voice.cpp
|
2020-03-26 17:20:08 +03:00
|
|
|
${source_DIR}/skyline/services/audio/IAudioRenderer/memory_pool.cpp
|
2020-07-04 23:22:35 +03:00
|
|
|
${source_DIR}/skyline/services/settings/ISettingsServer.cpp
|
2020-02-16 22:25:18 +03:00
|
|
|
${source_DIR}/skyline/services/settings/ISystemSettingsServer.cpp
|
2020-02-18 14:41:22 +03:00
|
|
|
${source_DIR}/skyline/services/apm/IManager.cpp
|
|
|
|
${source_DIR}/skyline/services/apm/ISession.cpp
|
2020-02-19 23:35:54 +03:00
|
|
|
${source_DIR}/skyline/services/am/IAllSystemAppletProxiesService.cpp
|
|
|
|
${source_DIR}/skyline/services/am/IApplicationProxyService.cpp
|
|
|
|
${source_DIR}/skyline/services/am/proxy/base_proxy.cpp
|
|
|
|
${source_DIR}/skyline/services/am/proxy/IApplicationProxy.cpp
|
|
|
|
${source_DIR}/skyline/services/am/proxy/ILibraryAppletProxy.cpp
|
|
|
|
${source_DIR}/skyline/services/am/proxy/IOverlayAppletProxy.cpp
|
|
|
|
${source_DIR}/skyline/services/am/proxy/ISystemAppletProxy.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/IAppletCommonFunctions.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/IApplicationFunctions.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/IAudioController.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/ICommonStateGetter.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/IDebugFunctions.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/IDisplayController.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/ILibraryAppletCreator.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/ISelfController.cpp
|
|
|
|
${source_DIR}/skyline/services/am/controller/IWindowController.cpp
|
2020-07-04 22:15:33 +03:00
|
|
|
${source_DIR}/skyline/services/am/storage/IStorage.cpp
|
|
|
|
${source_DIR}/skyline/services/am/storage/IStorageAccessor.cpp
|
2020-07-07 17:58:38 +03:00
|
|
|
${source_DIR}/skyline/services/am/applet/ILibraryAppletAccessor.cpp
|
2020-02-16 22:42:32 +03:00
|
|
|
${source_DIR}/skyline/services/hid/IHidServer.cpp
|
|
|
|
${source_DIR}/skyline/services/hid/IAppletResource.cpp
|
2020-09-05 02:06:07 +03:00
|
|
|
${source_DIR}/skyline/services/hid/IActiveVibrationDeviceList.cpp
|
2020-02-16 21:42:38 +03:00
|
|
|
${source_DIR}/skyline/services/timesrv/IStaticService.cpp
|
|
|
|
${source_DIR}/skyline/services/timesrv/ISystemClock.cpp
|
2020-07-09 21:36:28 +03:00
|
|
|
${source_DIR}/skyline/services/timesrv/ISteadyClock.cpp
|
2020-02-16 21:42:38 +03:00
|
|
|
${source_DIR}/skyline/services/timesrv/ITimeZoneService.cpp
|
2020-02-16 23:05:22 +03:00
|
|
|
${source_DIR}/skyline/services/fssrv/IFileSystemProxy.cpp
|
|
|
|
${source_DIR}/skyline/services/fssrv/IFileSystem.cpp
|
2020-08-08 22:38:51 +03:00
|
|
|
${source_DIR}/skyline/services/fssrv/IFile.cpp
|
2020-06-23 21:49:06 +03:00
|
|
|
${source_DIR}/skyline/services/fssrv/IStorage.cpp
|
2020-11-03 12:40:42 +03:00
|
|
|
${source_DIR}/skyline/services/fssrv/IDirectory.cpp
|
2020-03-24 23:17:31 +03:00
|
|
|
${source_DIR}/skyline/services/nvdrv/INvDrvServices.cpp
|
2020-09-14 17:13:36 +03:00
|
|
|
${source_DIR}/skyline/services/nvdrv/driver.cpp
|
2020-09-17 23:38:23 +03:00
|
|
|
${source_DIR}/skyline/services/nvdrv/devices/nvdevice.cpp
|
2020-03-24 23:17:31 +03:00
|
|
|
${source_DIR}/skyline/services/nvdrv/devices/nvmap.cpp
|
|
|
|
${source_DIR}/skyline/services/nvdrv/devices/nvhost_ctrl_gpu.cpp
|
|
|
|
${source_DIR}/skyline/services/nvdrv/devices/nvhost_ctrl.cpp
|
|
|
|
${source_DIR}/skyline/services/nvdrv/devices/nvhost_channel.cpp
|
|
|
|
${source_DIR}/skyline/services/nvdrv/devices/nvhost_as_gpu.cpp
|
2020-07-23 22:20:42 +03:00
|
|
|
${source_DIR}/skyline/services/nvdrv/devices/nvhost_syncpoint.cpp
|
2020-03-24 23:17:31 +03:00
|
|
|
${source_DIR}/skyline/services/hosbinder/IHOSBinderDriver.cpp
|
2020-09-14 17:13:36 +03:00
|
|
|
${source_DIR}/skyline/services/hosbinder/GraphicBufferProducer.cpp
|
2020-03-24 23:17:31 +03:00
|
|
|
${source_DIR}/skyline/services/visrv/IDisplayService.cpp
|
|
|
|
${source_DIR}/skyline/services/visrv/IApplicationDisplayService.cpp
|
|
|
|
${source_DIR}/skyline/services/visrv/IManagerDisplayService.cpp
|
|
|
|
${source_DIR}/skyline/services/visrv/IManagerRootService.cpp
|
|
|
|
${source_DIR}/skyline/services/visrv/ISystemDisplayService.cpp
|
2020-07-04 23:52:07 +03:00
|
|
|
${source_DIR}/skyline/services/pl/IPlatformServiceManager.cpp
|
2020-07-04 22:58:16 +03:00
|
|
|
${source_DIR}/skyline/services/aocsrv/IAddOnContentManager.cpp
|
2020-07-04 23:06:58 +03:00
|
|
|
${source_DIR}/skyline/services/pctl/IParentalControlServiceFactory.cpp
|
2020-07-08 13:59:02 +03:00
|
|
|
${source_DIR}/skyline/services/pctl/IParentalControlService.cpp
|
2020-07-04 21:56:33 +03:00
|
|
|
${source_DIR}/skyline/services/lm/ILogService.cpp
|
|
|
|
${source_DIR}/skyline/services/lm/ILogger.cpp
|
2020-07-04 22:35:07 +03:00
|
|
|
${source_DIR}/skyline/services/account/IAccountServiceForApplication.cpp
|
2020-07-09 16:16:51 +03:00
|
|
|
${source_DIR}/skyline/services/account/IManagerForApplication.cpp
|
2020-07-19 23:35:50 +03:00
|
|
|
${source_DIR}/skyline/services/account/IProfile.cpp
|
2020-07-09 16:22:49 +03:00
|
|
|
${source_DIR}/skyline/services/friends/IServiceCreator.cpp
|
|
|
|
${source_DIR}/skyline/services/friends/IFriendService.cpp
|
2020-08-09 17:02:38 +03:00
|
|
|
${source_DIR}/skyline/services/friends/INotificationService.cpp
|
2020-07-09 16:28:26 +03:00
|
|
|
${source_DIR}/skyline/services/nfp/IUserManager.cpp
|
|
|
|
${source_DIR}/skyline/services/nfp/IUser.cpp
|
2020-07-09 16:31:04 +03:00
|
|
|
${source_DIR}/skyline/services/nifm/IStaticService.cpp
|
|
|
|
${source_DIR}/skyline/services/nifm/IGeneralService.cpp
|
|
|
|
${source_DIR}/skyline/services/nifm/IRequest.cpp
|
2020-07-09 16:35:51 +03:00
|
|
|
${source_DIR}/skyline/services/socket/bsd/IClient.cpp
|
2020-07-09 16:38:18 +03:00
|
|
|
${source_DIR}/skyline/services/ssl/ISslService.cpp
|
2020-08-09 17:02:38 +03:00
|
|
|
${source_DIR}/skyline/services/ssl/ISslContext.cpp
|
2020-07-09 16:41:30 +03:00
|
|
|
${source_DIR}/skyline/services/prepo/IPrepoService.cpp
|
2019-07-24 23:19:43 +03:00
|
|
|
)
|
2021-02-08 07:17:17 +03:00
|
|
|
# target_precompile_headers(skyline PRIVATE ${source_DIR}/skyline/common.h) # PCH will currently break Intellisense
|
2021-01-22 06:02:01 +03:00
|
|
|
target_link_libraries(skyline vulkan android fmt lz4_static oboe mbedtls::mbedcrypto)
|
|
|
|
target_compile_options(skyline PRIVATE -Wall -Wno-unknown-attributes -Wno-c++20-extensions -Wno-c++17-extensions -Wno-c99-designator -Wno-reorder -Wno-missing-braces -Wno-unused-variable -Wno-unused-private-field)
|