ppsspp/CMakeLists.txt

2691 lines
79 KiB
CMake
Raw Normal View History

2012-11-26 22:03:44 +00:00
# vim:noexpandtab:
2022-01-17 19:13:24 +00:00
cmake_minimum_required(VERSION 3.8)
project(PPSSPP)
2021-02-17 05:42:31 +00:00
enable_testing()
#This is supposed to work but doesn't!
if(NOT ANDROID)
2022-01-17 19:13:24 +00:00
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
enable_language(ASM)
add_definitions(-D__STDC_CONSTANT_MACROS)
# Include AppleClang and Clang.
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CLANG ON)
message("Clang enabled")
endif()
if(FORCED_CPU)
message("Detected CPU (${CMAKE_SYSTEM_PROCESSOR}) overridden as: ${FORCED_CPU}")
set(CMAKE_SYSTEM_PROCESSOR ${FORCED_CPU})
endif()
2014-06-18 06:15:47 +00:00
# Detect CPU from CMAKE configuration. Toolchains should set this up
2014-11-13 15:41:30 +00:00
if(CMAKE_SYSTEM_PROCESSOR)
if(CMAKE_OSX_ARCHITECTURES)
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ".*86.*")
set(X86_DEVICE ON)
set(X86_64_DEVICE ON)
endif()
if("${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm64")
set(ARM64 ON)
endif()
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^aarch64")
set(ARM64 ON)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm64")
# M1 Mac
set(ARM64 ON)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
message("ARM_DEVICE is a go")
set(ARM_DEVICE ON)
if(UNIX AND NOT APPLE)
execute_process(COMMAND cat /proc/cpuinfo OUTPUT_VARIABLE OUTSTR)
string(FIND "${OUTSTR}" "ODROID-XU" pos)
if(NOT (pos LESS 0))
add_compile_options(-mfloat-abi=hard -marm -mtune=cortex-a15.cortex-a7 -mcpu=cortex-a15 -fomit-frame-pointer)
set(ARM_NO_VULKAN ON)
endif()
endif()
2014-11-14 08:07:29 +00:00
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv7")
set(ARMV7_DEVICE ON)
2018-09-20 15:06:49 +00:00
add_compile_options(-mfpu=neon)
# Horrifying workaround for bug in android cmake stuff for asm files
if(ANDROID)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -target armv7a-none-linux-android")
endif()
2014-11-14 08:07:29 +00:00
endif()
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^AMD64")
set(X86_DEVICE ON)
set(X86_64_DEVICE ON)
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
set(X86_DEVICE ON)
2014-11-13 15:41:30 +00:00
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^mips")
set(MIPS_DEVICE ON)
2021-06-24 18:56:43 +00:00
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^riscv64")
set(RISCV64_DEVICE ON)
else()
message("Unknown CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
2014-11-13 15:41:30 +00:00
endif()
2014-11-11 12:55:49 +00:00
endif()
2013-03-22 07:15:00 +00:00
2018-03-23 02:18:13 +00:00
# the libraries in the ffmpeg/ directory are not compatible with mingw
if(MINGW AND NOT DEFINED USE_SYSTEM_FFMPEG)
2018-03-24 12:39:05 +00:00
set(USE_SYSTEM_FFMPEG ON)
2018-03-23 02:18:13 +00:00
endif()
if(NOT ANDROID AND NOT IOS)
if(ARM_DEVICE OR SIMULATOR)
set(USING_EGL ON)
endif()
2014-06-18 06:15:47 +00:00
endif()
2022-04-02 23:34:13 +00:00
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND NOT USE_LIBNX)
set(LINUX ON)
add_definitions(-D__STDC_CONSTANT_MACROS)
endif()
2013-06-15 12:50:47 +00:00
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX ON)
set(USING_EGL OFF)
2013-06-15 12:50:47 +00:00
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
2017-12-13 21:58:45 +00:00
set(ANDROID ON)
endif()
# We only support Vulkan on Unix, macOS (by MoltenVK), Android and Windows.
if(ANDROID OR WIN32 OR (UNIX AND NOT ARM_NO_VULKAN))
set(VULKAN ON)
endif()
2023-05-05 21:17:45 +00:00
# Default to bundled SDL2 on macOS, system SDL2 elsewhere.
if(APPLE AND NOT IOS)
set(DEFAULT_USE_SYSTEM_LIBSDL2 OFF)
else()
set(DEFAULT_USE_SYSTEM_LIBSDL2 ON)
endif()
2020-12-02 21:46:56 +00:00
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
if(NOT IOS)
2020-12-02 21:46:56 +00:00
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/sdl)
endif()
include(ccache)
2020-12-06 01:49:21 +00:00
include(GNUInstallDirs)
2020-12-02 21:46:56 +00:00
2020-12-06 01:49:21 +00:00
add_definitions(-DASSETS_DIR="${CMAKE_INSTALL_FULL_DATADIR}/ppsspp/assets/")
2020-12-02 21:46:56 +00:00
if(OPENXR)
add_definitions(-DOPENXR)
2022-07-08 12:44:20 +00:00
add_library(openxr SHARED IMPORTED)
set_property(TARGET openxr PROPERTY IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/ext/openxr/stub/arm64-v8a/libopenxr_loader.so")
message("OpenXR enabled")
endif()
if(GOLD)
add_definitions(-DGOLD)
2017-03-17 10:55:14 +00:00
message("Gold Build")
else()
message("Normal Build")
endif()
# User-editable options (go into CMakeCache.txt)
# :: Processors
option(ARMV7 "Set to ON if targeting an ARMv7 processor" ${ARMV7_DEVICE})
option(ARM "Set to ON if targeting an ARM processor" ${ARM_DEVICE})
option(MIPS "Set to ON if targeting a MIPS processor" ${MIPS_DEVICE})
2021-06-24 18:56:43 +00:00
option(RISCV64 "Set to ON if targeting a RISCV64 processor" ${RISCV64_DEVICE})
option(X86 "Set to ON if targeting an X86 processor" ${X86_DEVICE})
option(X86_64 "Set to ON if targeting an X86_64 processor" ${X86_64_DEVICE})
# :: Environments
option(USING_EGL "Set to ON if target environment uses EGL" ${USING_EGL})
option(USING_FBDEV "Set to ON if target environment uses fbdev (eg. Pandora)" ${USING_FBDEV})
option(USING_GLES2 "Set to ON if target device uses OpenGL ES 2.0" ${USING_GLES2})
option(USING_X11_VULKAN "Set to OFF if target environment doesn't use X11 for Vulkan" ON)
option(USE_WAYLAND_WSI "Enable or disable Wayland WSI support for Vulkan" ${USE_WAYLAND_WSI})
option(USE_VULKAN_DISPLAY_KHR "Enable or disable full screen display of Vulkan" ${USE_VULKAN_DISPLAY_KHR})
# :: Frontends
2012-12-16 11:17:13 +00:00
option(USING_QT_UI "Set to ON if you wish to use the Qt frontend wrapper" ${USING_QT_UI})
option(MOBILE_DEVICE "Set to ON when targeting a mobile device" ${MOBILE_DEVICE})
option(HEADLESS "Set to OFF to not generate the PPSSPPHeadless target" ${HEADLESS})
option(UNITTEST "Set to ON to generate the unittest target" ${UNITTEST})
2013-11-26 02:18:15 +00:00
option(SIMULATOR "Set to ON when targeting an x86 simulator of an ARM platform" ${SIMULATOR})
2018-03-24 11:44:53 +00:00
option(LIBRETRO "Set to ON to generate the libretro target" OFF)
# :: Options
2022-04-02 23:34:13 +00:00
option(USE_LIBNX "Set to ON to build for Switch(libnx)" OFF)
option(USE_FFMPEG "Build with FFMPEG support" ON)
2018-11-10 15:39:27 +00:00
option(USE_DISCORD "Build with Discord support" ON)
2020-01-17 19:32:09 +00:00
option(USE_MINIUPNPC "Build with miniUPnPc support" ON)
2022-12-17 18:08:46 +00:00
option(USE_ARMIPS "Build with armips support in API/debugger" ON)
option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY})
option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
2023-05-05 21:17:45 +00:00
option(USE_SYSTEM_LIBSDL2 "Dynamically link against system SDL2" ${DEFAULT_USE_SYSTEM_LIBSDL2})
option(USE_SYSTEM_LIBPNG "Dynamically link against system libpng" ON)
2021-10-28 08:30:05 +00:00
option(USE_SYSTEM_ZSTD "Dynamically link against system zstd" ${USE_SYSTEM_ZSTD})
option(USE_SYSTEM_MINIUPNPC "Dynamically link against system miniUPnPc" ${USE_SYSTEM_MINIUPNPC})
option(USE_ASAN "Use address sanitizer" OFF)
2021-01-29 23:06:00 +00:00
option(USE_UBSAN "Use undefined behaviour sanitizer" OFF)
2017-12-27 14:28:17 +00:00
if(UNIX AND NOT (APPLE OR ANDROID) AND VULKAN)
if(USING_X11_VULKAN)
message("Using X11 for Vulkan")
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
else()
message("NOT using X11 for Vulkan")
endif()
2017-12-26 12:00:40 +00:00
# add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
if(USE_WAYLAND_WSI)
find_package(Wayland)
if(NOT WAYLAND_FOUND)
message(STATUS "Could not find Wayland libraries, disabling Wayland WSI support for Vulkan.")
else()
include_directories(${WAYLAND_INCLUDE_DIR})
add_definitions(-DVK_USE_PLATFORM_WAYLAND_KHR)
endif()
2017-12-26 12:00:40 +00:00
endif()
if(USE_VULKAN_DISPLAY_KHR)
message(STATUS "Using experimental full-screen display for Vulkan.")
add_definitions(-DVK_USE_PLATFORM_DISPLAY_KHR)
endif()
2017-12-26 12:00:40 +00:00
endif()
2017-12-13 21:58:45 +00:00
2018-03-24 11:44:53 +00:00
if(LIBRETRO)
add_definitions(-D__LIBRETRO__)
add_definitions(-DGLEW_NO_GLU)
2018-03-24 12:39:05 +00:00
if(NOT MSVC)
add_compile_options(-fPIC)
endif()
2018-03-24 11:44:53 +00:00
endif()
if(ANDROID)
set(MOBILE_DEVICE ON)
set(USING_GLES2 ON)
endif()
if(ANDROID AND NOT LIBRETRO)
set(CoreLibName ppsspp_jni)
set(CoreLinkType SHARED)
else()
set(CoreLibName Core)
set(CoreLinkType STATIC)
endif()
# Work around for some misfeature of the current glslang build system
2020-03-03 21:46:26 +00:00
include_directories(ext/glslang)
2020-10-05 07:13:35 +00:00
# Not sure if this is the best way - what about system glew?
# Anyway, glew will be going away anyway.
include_directories(ext/glew)
2020-03-03 21:46:26 +00:00
2022-08-16 15:39:54 +00:00
if(OPENXR)
set(OPENGL_LIBRARIES GLESv3 EGL)
elseif(NOT OPENGL_LIBRARIES AND USING_GLES2)
set(OPENGL_LIBRARIES GLESv2 EGL)
2014-06-18 06:15:47 +00:00
endif()
if(NOT OPENGL_LIBRARIES)
if(POLICY CMP0072)
cmake_policy(SET CMP0072 NEW)
endif()
find_package(OpenGL REQUIRED)
endif()
if(USING_EGL)
if(NOT EGL_LIBRARIES)
set(EGL_LIBRARIES EGL)
endif()
set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${EGL_LIBRARIES})
endif()
if(NOT LIBRETRO AND NOT IOS AND NOT MACOSX)
find_package(SDL2)
endif()
if(MACOSX AND NOT IOS)
2023-05-05 21:17:45 +00:00
if(USE_SYSTEM_LIBSDL2)
find_package(SDL2)
else()
find_library(SDL2Fwk SDL2 REQUIRED PATHS SDL/macOS)
message(STATUS "found SDL2Fwk=${SDL2Fwk}")
add_definitions(-DHAVE_SYSCTLBYNAME)
endif()
endif()
include(FindThreads)
2014-06-18 06:15:47 +00:00
if(APPLE)
find_library(COCOA_LIBRARY Cocoa)
find_library(IOKIT_LIBRARY IOKit)
find_library(QUARTZ_CORE_LIBRARY QuartzCore)
endif()
include_directories("${CMAKE_SOURCE_DIR}")
if(USING_EGL)
add_definitions(-DUSING_EGL)
2013-01-12 15:15:46 +00:00
endif()
if(USING_FBDEV)
add_definitions(-DUSING_FBDEV -DEGL_NO_X11)
endif()
2012-12-16 11:17:13 +00:00
if(USING_GLES2)
add_definitions(-DUSING_GLES2)
endif()
if(MOBILE_DEVICE)
add_definitions(-DMOBILE_DEVICE)
endif()
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")
endif()
message("CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
# Let's not use elseif here so we can catch dupes.
if(ARMV7)
message("Generating for ARMv7, ${CMAKE_BUILD_TYPE}")
endif()
if(ARM)
message("Generating for ARM, ${CMAKE_BUILD_TYPE}")
endif()
if(MIPS AND X86)
message("Generating for MIPS in x86 mode, ${CMAKE_BUILD_TYPE}")
endif()
if(MIPS)
message("Generating for MIPS, ${CMAKE_BUILD_TYPE}")
endif()
2021-06-24 18:56:43 +00:00
if(RISCV64)
message("Generating for RISCV64, ${CMAKE_BUILD_TYPE}")
endif()
if(X86)
message("Generating for x86, ${CMAKE_BUILD_TYPE}")
endif()
if(X86_64)
message("Generating for x86_64, ${CMAKE_BUILD_TYPE}")
endif()
if(ARM64)
message("Generating for ARMv8, ${CMAKE_BUILD_TYPE}")
endif()
# It looks like the flags for the selected build type are written to the cache after each run, which causes some of the operations
# below to keep expanding them with the same flags over and over on every run, leading to a rebuild of the majority of the files.
# To work around this, remember the initial state of the variables from the first run and reset the variables to that.
# TODO: Setting the attributes per target would probably be a better solution.
foreach (LANGUAGE C CXX)
foreach (BUILD_TYPE DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
set(_CMAKE_${LANGUAGE}_FLAGS_${BUILD_TYPE}_INITIAL ${CMAKE_${LANGUAGE}_FLAGS_${BUILD_TYPE}} CACHE STRING "")
set(CMAKE_${LANGUAGE}_FLAGS_${BUILD_TYPE} ${_CMAKE_${LANGUAGE}_FLAGS_${BUILD_TYPE}_INITIAL})
endforeach()
endforeach()
if(NOT MSVC)
# NEON optimizations in libpng17 seem to cause PNG load errors, see #14485.
add_definitions(-DPNG_ARM_NEON_OPT=0)
if(ANDROID)
2022-01-17 19:13:24 +00:00
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
endif()
if(CLANG)
add_definitions(-Wno-nullability-completeness)
add_definitions(-Wno-tautological-pointer-compare)
add_definitions(-Wno-deprecated-register)
endif()
2017-03-15 14:56:06 +00:00
if(USE_ASAN)
message("Address sanitizer enabled (DEBUG only)")
2021-01-29 23:06:00 +00:00
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address")
add_definitions(-DUSE_ASAN)
endif()
2021-01-29 23:06:00 +00:00
if(USE_UBSAN)
message("Undefined behaviour sanitizer enabled (DEBUG only)")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=undefined")
2021-01-29 23:29:54 +00:00
# UBSAN is a collection of sanitizers, including vtpr, which reqiuires RTTI.
# ext/glslang disables RTTI by default using the `ENABLE_RTTI` option.
# If RTTI is disabled, we must also disable the vtpr sanitizer.
if(NOT ENABLE_RTTI)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-sanitize=vptr")
set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-sanitize=vptr")
endif()
2021-01-29 23:06:00 +00:00
endif()
2017-03-15 14:56:06 +00:00
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -D_DEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -D_NDEBUG")
2017-03-15 14:56:06 +00:00
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -D_DEBUG")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -D_NDEBUG")
2017-03-15 14:56:06 +00:00
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")
# Enable checking printf-like format strings (also works for logging functions)
add_definitions(-Wformat)
# Disable some warnings
add_definitions(-Wno-multichar)
# Don't compile with strict aliasing, we're not 100% aliasing-safe
2018-03-23 02:18:13 +00:00
add_compile_options(-fno-strict-aliasing)
if(${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -parallel -fopenmp")
endif()
if(X86 OR X86_64)
# enable sse2 code generation
add_definitions(-msse2)
if(NOT X86_64 AND NOT CLANG)
add_definitions(-mfpmath=sse)
# add_definitions(-mstackrealign)
endif()
endif()
2013-02-24 12:17:52 +00:00
if(IOS)
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
elseif(APPLE AND NOT CMAKE_CROSSCOMPILING)
2023-02-01 23:39:42 +00:00
if(LIBRETRO AND ARM64)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13")
endif()
2021-10-13 01:53:14 +00:00
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -U__STRICT_ANSI__")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
elseif(NOT ANDROID)
# TODO: See if we can get rid of no-psabi
if(NOT ${CMAKE_C_COMPILER_ID} STREQUAL "Intel" AND NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
add_definitions(-Wno-psabi)
endif()
2016-10-11 15:34:19 +00:00
add_definitions(-D_XOPEN_SOURCE=700)
add_definitions(-D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1)
add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64)
elseif(ANDROID)
add_definitions(-fsigned-char)
endif()
else()
# Disable warnings about MS-specific _s variants of libc functions
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
2020-08-13 14:48:48 +00:00
if (NOT CLANG)
add_compile_options(-MP)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_NDEBUG")
endif()
2018-03-23 02:18:13 +00:00
if(WIN32)
2018-03-24 12:39:05 +00:00
add_definitions(-D_UNICODE -DUNICODE)
add_definitions(-DUSING_WIN_UI)
2018-03-23 02:18:13 +00:00
endif()
if(NOT ANDROID)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
endif()
# This sets up the MSVC project dirs according to the physical project dirs
macro(setup_target_project TargetName ProjectDir)
get_property(TargetSources TARGET "${TargetName}" PROPERTY SOURCES)
foreach(Source ${TargetSources})
# Figure out the file's path relative to the ProjectDir
# NOTE: &#$@ double-quoted regexps
string(REGEX REPLACE "${ProjectDir}" "" RelativePath "${Source}")
string(REGEX REPLACE "[\\\\/][^\\\\/]*$" "" RelativePath "${RelativePath}")
string(REGEX REPLACE "^[\\\\/]" "" RelativePath "${RelativePath}")
string(REGEX REPLACE "/" "\\\\\\\\" RelativePath "${RelativePath}")
# put the source file in a source_group equivalent to the relative path
source_group("${RelativePath}" FILES ${Source})
endforeach()
endmacro()
add_subdirectory(ext)
if(WIN32)
include_directories(dx9sdk/Include)
include_directories(dx9sdk/Include/DX11)
endif()
set(CommonJIT
Core/MIPS/JitCommon/JitCommon.cpp
Core/MIPS/JitCommon/JitCommon.h
Core/MIPS/JitCommon/JitBlockCache.cpp
Core/MIPS/JitCommon/JitBlockCache.h
Core/MIPS/JitCommon/JitState.cpp
Core/MIPS/JitCommon/JitState.h
)
set(CommonX86
Common/ABI.cpp
Common/ABI.h
Common/CPUDetect.cpp
Common/CPUDetect.h
Common/Thunk.cpp
Common/Thunk.h
Common/x64Analyzer.cpp
Common/x64Analyzer.h
Common/x64Emitter.cpp
Common/x64Emitter.h
)
source_group(x86 FILES ${CommonX86})
set(CommonARM
Common/ArmCPUDetect.cpp
Common/ArmEmitter.h
Common/ArmEmitter.cpp
)
source_group(ARM FILES ${CommonARM})
set(CommonARM64
Common/Arm64Emitter.h
Common/Arm64Emitter.cpp
Common/ArmEmitter.h
Common/ArmEmitter.cpp
Core/Util/DisArm64.h
Core/Util/DisArm64.cpp
)
source_group(ARM64 FILES ${CommonARM64})
set(CommonMIPS
Common/MipsCPUDetect.cpp
Common/MipsEmitter.cpp
Common/MipsEmitter.h
)
source_group(MIPS FILES ${CommonMIPS})
2021-06-29 11:46:17 +00:00
set(CommonRISCV64
${CommonJIT}
2021-07-28 11:58:56 +00:00
Common/RiscVCPUDetect.cpp
2022-08-24 17:12:49 +00:00
Common/RiscVEmitter.cpp
Common/RiscVEmitter.h
2021-06-29 11:46:17 +00:00
Core/MIPS/fake/FakeJit.cpp
Core/MIPS/fake/FakeJit.h
)
source_group(RISCV64 FILES ${CommonRISCV64})
if(WIN32)
set(CommonD3D
Common/GPU/D3D9/D3D9ShaderCompiler.cpp
Common/GPU/D3D9/D3D9ShaderCompiler.h
Common/GPU/D3D9/D3D9StateCache.cpp
Common/GPU/D3D9/D3D9StateCache.h
Common/GPU/D3D9/thin3d_d3d9.cpp
Common/GPU/D3D9/D3DCompilerLoader.cpp
Common/GPU/D3D11/thin3d_d3d11.cpp
Common/GPU/D3D11/D3D11Loader.cpp
Common/GPU/D3D11/D3D11Loader.h
)
endif()
2022-10-17 17:25:55 +00:00
set(CommonVR
Common/VR/OpenXRLoader.cpp
Common/VR/OpenXRLoader.h
2022-10-17 17:25:55 +00:00
Common/VR/PPSSPPVR.cpp
Common/VR/PPSSPPVR.h
Common/VR/VRBase.cpp
Common/VR/VRBase.h
Common/VR/VRFramebuffer.cpp
Common/VR/VRFramebuffer.h
Common/VR/VRInput.cpp
Common/VR/VRInput.h
Common/VR/VRMath.cpp
Common/VR/VRMath.h
Common/VR/VRRenderer.cpp
Common/VR/VRRenderer.h
)
include_directories(ext/openxr)
add_library(Common STATIC
${CommonX86}
${CommonARM}
${CommonARM64}
${CommonMIPS}
2021-06-29 11:46:17 +00:00
${CommonRISCV64}
${CommonD3D}
2022-10-17 17:25:55 +00:00
${CommonVR}
Common/Serialize/Serializer.cpp
Common/Serialize/Serializer.h
Common/Serialize/SerializeDeque.h
Common/Serialize/SerializeFuncs.h
Common/Serialize/SerializeList.h
Common/Serialize/SerializeMap.h
Common/Serialize/SerializeSet.h
Common/Crypto/md5.cpp
Common/Crypto/md5.h
Common/Crypto/sha1.cpp
Common/Crypto/sha1.h
2014-12-07 18:25:45 +00:00
Common/Crypto/sha256.cpp
Common/Crypto/sha256.h
Common/Data/Collections/ConstMap.h
Common/Data/Collections/FixedSizeQueue.h
Common/Data/Collections/Hashmaps.h
Common/Data/Collections/TinySet.h
Common/Data/Collections/ThreadSafeList.h
Common/Data/Color/RGBAUtil.cpp
Common/Data/Color/RGBAUtil.h
Common/Data/Convert/ColorConv.cpp
Common/Data/Convert/ColorConv.h
Common/Data/Convert/SmallDataConvert.cpp
Common/Data/Convert/SmallDataConvert.h
Common/Data/Encoding/Base64.cpp
Common/Data/Encoding/Base64.h
Common/Data/Encoding/Compression.cpp
Common/Data/Encoding/Compression.h
Common/Data/Encoding/Shiftjis.h
Common/Data/Encoding/Utf8.cpp
Common/Data/Encoding/Utf8.h
Common/Data/Encoding/Utf16.h
Common/Data/Format/RIFF.cpp
Common/Data/Format/RIFF.h
Common/Data/Format/IniFile.cpp
Common/Data/Format/IniFile.h
Common/Data/Format/JSONReader.h
Common/Data/Format/JSONReader.cpp
Common/Data/Format/JSONWriter.h
Common/Data/Format/JSONWriter.cpp
2023-02-26 18:51:59 +00:00
Common/Data/Format/DDSLoad.cpp
Common/Data/Format/DDSLoad.h
Common/Data/Format/PNGLoad.cpp
Common/Data/Format/PNGLoad.h
Common/Data/Format/ZIMLoad.cpp
Common/Data/Format/ZIMLoad.h
Common/Data/Format/ZIMSave.cpp
Common/Data/Format/ZIMSave.h
Common/Data/Hash/Hash.cpp
Common/Data/Hash/Hash.h
Common/Data/Text/I18n.cpp
Common/Data/Text/I18n.h
Common/Data/Text/Parsers.cpp
Common/Data/Text/Parsers.h
Common/Data/Text/WrapText.cpp
Common/Data/Text/WrapText.h
Common/Data/Random/Rng.h
Common/File/VFS/VFS.h
Common/File/VFS/VFS.cpp
2023-03-06 14:30:39 +00:00
Common/File/VFS/ZipFileReader.cpp
Common/File/VFS/ZipFileReader.h
Common/File/VFS/DirectoryReader.cpp
Common/File/VFS/DirectoryReader.h
Common/File/AndroidStorage.h
Common/File/AndroidStorage.cpp
Common/File/DiskFree.h
Common/File/DiskFree.cpp
Common/File/Path.h
Common/File/Path.cpp
Common/File/PathBrowser.h
Common/File/PathBrowser.cpp
Common/File/FileUtil.cpp
Common/File/FileUtil.h
Common/File/DirListing.cpp
Common/File/DirListing.h
Common/File/FileDescriptor.cpp
Common/File/FileDescriptor.h
Common/GPU/DataFormat.h
Common/GPU/MiscTypes.h
Common/GPU/thin3d.cpp
Common/GPU/thin3d.h
Common/GPU/thin3d_create.h
Common/GPU/Shader.cpp
Common/GPU/Shader.h
Common/GPU/ShaderWriter.cpp
Common/GPU/ShaderWriter.h
Common/GPU/ShaderTranslation.h
Common/GPU/ShaderTranslation.cpp
Common/GPU/OpenGL/GLCommon.h
Common/GPU/OpenGL/GLDebugLog.cpp
Common/GPU/OpenGL/GLDebugLog.h
Common/GPU/OpenGL/GLSLProgram.cpp
Common/GPU/OpenGL/GLSLProgram.h
Common/GPU/OpenGL/gl3stub.c
Common/GPU/OpenGL/gl3stub.h
Common/GPU/OpenGL/GLFeatures.cpp
Common/GPU/OpenGL/GLFeatures.h
Common/GPU/OpenGL/GLFrameData.cpp
Common/GPU/OpenGL/GLFrameData.h
Common/GPU/OpenGL/thin3d_gl.cpp
Common/GPU/OpenGL/GLRenderManager.cpp
Common/GPU/OpenGL/GLRenderManager.h
Common/GPU/OpenGL/GLQueueRunner.cpp
Common/GPU/OpenGL/GLQueueRunner.h
Common/GPU/OpenGL/DataFormatGL.cpp
Common/GPU/OpenGL/DataFormatGL.h
2022-05-01 08:18:55 +00:00
Common/GPU/Vulkan/VulkanBarrier.cpp
Common/GPU/Vulkan/VulkanBarrier.h
Common/GPU/Vulkan/VulkanDebug.cpp
Common/GPU/Vulkan/VulkanDebug.h
Common/GPU/Vulkan/VulkanContext.cpp
Common/GPU/Vulkan/VulkanContext.h
Common/GPU/Vulkan/VulkanFramebuffer.cpp
Common/GPU/Vulkan/VulkanFramebuffer.h
Common/GPU/Vulkan/VulkanImage.cpp
Common/GPU/Vulkan/VulkanImage.h
Common/GPU/Vulkan/VulkanLoader.cpp
Common/GPU/Vulkan/VulkanLoader.h
Common/GPU/Vulkan/VulkanMemory.cpp
Common/GPU/Vulkan/VulkanMemory.h
Common/GPU/Vulkan/VulkanProfiler.cpp
Common/GPU/Vulkan/VulkanProfiler.h
Common/GPU/Vulkan/thin3d_vulkan.cpp
Common/GPU/Vulkan/VulkanRenderManager.cpp
Common/GPU/Vulkan/VulkanRenderManager.h
Common/GPU/Vulkan/VulkanQueueRunner.cpp
Common/GPU/Vulkan/VulkanQueueRunner.h
Common/GPU/Vulkan/VulkanFrameData.cpp
Common/GPU/Vulkan/VulkanFrameData.h
Common/Input/GestureDetector.cpp
Common/Input/GestureDetector.h
Common/Input/KeyCodes.h
Common/Input/InputState.cpp
Common/Input/InputState.h
Common/Math/fast/fast_matrix.c
Common/Math/curves.cpp
Common/Math/curves.h
Common/Math/expression_parser.cpp
Common/Math/expression_parser.h
Common/Math/lin/matrix4x4.cpp
Common/Math/lin/matrix4x4.h
Common/Math/lin/vec3.cpp
Common/Math/lin/vec3.h
Common/Math/math_util.cpp
Common/Math/math_util.h
Common/Math/Statistics.h
Common/Math/Statistics.cpp
Common/Net/HTTPClient.cpp
Common/Net/HTTPClient.h
Common/Net/HTTPHeaders.cpp
Common/Net/HTTPHeaders.h
Common/Net/HTTPServer.cpp
Common/Net/HTTPServer.h
Common/Net/NetBuffer.cpp
Common/Net/NetBuffer.h
Common/Net/Resolve.cpp
Common/Net/Resolve.h
Common/Net/Sinks.cpp
Common/Net/Sinks.h
Common/Net/URL.cpp
Common/Net/URL.h
Common/Net/WebsocketServer.cpp
Common/Net/WebsocketServer.h
2020-10-04 08:04:01 +00:00
Common/Profiler/Profiler.cpp
Common/Profiler/Profiler.h
Common/Render/TextureAtlas.cpp
Common/Render/TextureAtlas.h
Common/Render/DrawBuffer.cpp
Common/Render/DrawBuffer.h
Common/Render/ManagedTexture.cpp
Common/Render/ManagedTexture.h
2020-10-04 22:05:28 +00:00
Common/Render/Text/draw_text.cpp
Common/Render/Text/draw_text.h
Common/Render/Text/draw_text_android.cpp
Common/Render/Text/draw_text_android.h
Common/Render/Text/draw_text_win.cpp
Common/Render/Text/draw_text_win.h
Common/Render/Text/draw_text_uwp.cpp
Common/Render/Text/draw_text_uwp.h
2020-10-04 08:10:55 +00:00
Common/System/Display.cpp
Common/System/Display.h
Common/System/System.h
Common/System/NativeApp.h
Common/System/Request.cpp
Common/System/Request.h
Common/Thread/Channel.h
Common/Thread/ParallelLoop.cpp
Common/Thread/ParallelLoop.h
Common/Thread/Promise.h
Common/Thread/ThreadUtil.cpp
Common/Thread/ThreadUtil.h
Common/Thread/ThreadManager.cpp
Common/Thread/ThreadManager.h
Common/UI/AsyncImageFileView.cpp
Common/UI/AsyncImageFileView.h
Common/UI/Root.cpp
Common/UI/Root.h
Common/UI/Screen.cpp
Common/UI/Screen.h
Common/UI/UI.cpp
Common/UI/UI.h
Common/UI/Context.cpp
Common/UI/Context.h
Common/UI/UIScreen.cpp
Common/UI/UIScreen.h
Common/UI/Tween.cpp
Common/UI/Tween.h
Common/UI/View.cpp
Common/UI/View.h
Common/UI/ViewGroup.cpp
Common/UI/ViewGroup.h
Common/UI/ScrollView.cpp
Common/UI/ScrollView.h
Common/UI/PopupScreens.cpp
Common/UI/PopupScreens.h
2020-09-29 10:53:18 +00:00
Common/BitScan.h
Common/BitSet.h
2020-09-29 11:02:02 +00:00
Common/Buffer.h
Common/Buffer.cpp
2020-09-29 10:53:18 +00:00
Common/CodeBlock.h
Common/Common.h
Common/CommonFuncs.h
Common/CommonTypes.h
Common/ConsoleListener.cpp
Common/ConsoleListener.h
Common/DbgNew.h
Common/FakeEmitter.h
Common/FakeCPUDetect.cpp
Common/ExceptionHandlerSetup.cpp
Common/ExceptionHandlerSetup.h
2020-08-16 11:48:31 +00:00
Common/Log.h
Common/Log.cpp
2019-08-12 19:53:51 +00:00
Common/LogManager.cpp
Common/LogManager.h
Common/LogReporting.cpp
Common/LogReporting.h
Common/MemArenaAndroid.cpp
2017-01-25 18:29:43 +00:00
Common/MemArenaDarwin.cpp
Common/MemArenaPosix.cpp
Common/MemArenaWin32.cpp
Common/MemArena.h
Common/MemoryUtil.cpp
Common/MemoryUtil.h
Common/OSVersion.cpp
Common/OSVersion.h
Common/StringUtils.cpp
Common/StringUtils.h
Common/SysError.h
Common/SysError.cpp
Common/TimeUtil.cpp
Common/TimeUtil.h
Common/Battery/Battery.h
)
2017-03-13 22:45:25 +00:00
include_directories(Common)
setup_target_project(Common Common)
2023-01-29 21:02:36 +00:00
target_link_libraries(Common Ext::Snappy cpu_features)
2016-12-18 18:01:05 +00:00
if(USING_GLES2 OR (USING_EGL AND NOT USING_FBDEV))
find_package(X11)
endif()
add_library(gason STATIC
ext/gason/gason.cpp
ext/gason/gason.h
2013-11-26 17:18:30 +00:00
)
2021-11-22 18:53:00 +00:00
add_library(vma STATIC
ext/vma/vk_mem_alloc.cpp
ext/vma/vk_mem_alloc.h
)
if(USE_FFMPEG)
if(NOT FFMPEG_DIR)
if(NOT USE_SYSTEM_FFMPEG)
if(ANDROID)
if(ARMV7)
set(PLATFORM_ARCH "android/armv7")
elseif(ARM64)
set(PLATFORM_ARCH "android/arm64")
elseif(X86_64)
set(PLATFORM_ARCH "android/x86_64")
elseif(X86)
set(PLATFORM_ARCH "android/x86")
endif()
elseif(IOS)
set(PLATFORM_ARCH "ios/universal")
elseif(MACOSX)
set(PLATFORM_ARCH "macosx/universal")
elseif(LINUX)
if(ARMV7)
set(PLATFORM_ARCH "linux/armv7")
elseif(ARM64)
set(PLATFORM_ARCH "linux/aarch64")
elseif(ARM)
set(PLATFORM_ARCH "linux/arm")
elseif(MIPS)
set(PLATFORM_ARCH "linux/mips32")
2021-06-24 18:56:43 +00:00
elseif(RISCV64)
set(PLATFORM_ARCH "linux/riscv64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PLATFORM_ARCH "linux/x86_64")
elseif(X86)
set(PLATFORM_ARCH "linux/x86")
endif()
elseif(WIN32)
if(X86_64)
set(PLATFORM_ARCH "Windows/x86_64")
elseif(X86)
set(PLATFORM_ARCH "Windows/x86")
endif()
endif()
if(PLATFORM_ARCH)
set(FFMPEG_DIR "ffmpeg/${PLATFORM_ARCH}")
else()
message("Couldn't find an internal FFmpeg build, using system FFmpeg instead")
endif()
endif()
endif()
find_package(FFmpeg REQUIRED avcodec avformat avutil swresample swscale)
endif(USE_FFMPEG)
find_package(ZLIB)
if(ZLIB_FOUND AND NOT ANDROID)
include_directories(${ZLIB_INCLUDE_DIR})
add_definitions(-DSHARED_ZLIB)
else()
add_library(zlib STATIC
ext/zlib/adler32.c
ext/zlib/compress.c
ext/zlib/crc32.c
ext/zlib/crc32.h
ext/zlib/deflate.c
ext/zlib/deflate.h
ext/zlib/gzclose.c
ext/zlib/gzguts.h
ext/zlib/gzlib.c
ext/zlib/gzread.c
ext/zlib/gzwrite.c
ext/zlib/infback.c
ext/zlib/inffast.c
ext/zlib/inffast.h
ext/zlib/inffixed.h
ext/zlib/inflate.c
ext/zlib/inflate.h
ext/zlib/inftrees.c
ext/zlib/inftrees.h
ext/zlib/make_vms.com
ext/zlib/trees.c
ext/zlib/trees.h
ext/zlib/uncompr.c
ext/zlib/zconf.h
ext/zlib/zlib.h
ext/zlib/zutil.c
ext/zlib/zutil.h
)
include_directories(ext/zlib)
set(ZLIB_LIBRARY zlib)
endif()
add_library(cityhash STATIC
ext/cityhash/city.cpp
ext/cityhash/city.h
ext/cityhash/citycrc.h
)
target_include_directories(cityhash PRIVATE ext/cityhash)
if(NOT MSVC)
# These can be fast even for debug.
set_target_properties(udis86 PROPERTIES COMPILE_FLAGS "-O2")
set_target_properties(cityhash PROPERTIES COMPILE_FLAGS "-O2")
if(NOT ZLIB_FOUND)
set_target_properties(zlib PROPERTIES COMPILE_FLAGS "-O2")
endif()
endif()
2021-01-05 14:38:06 +00:00
find_package(LIBZIP)
if(LIBZIP_FOUND AND USE_SYSTEM_LIBZIP)
add_definitions(-DSHARED_LIBZIP)
else()
add_library(libzip STATIC
ext/libzip/zip_add.c
ext/libzip/zip_add_dir.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_add_entry.c
ext/libzip/zip_algorithm_deflate.c
ext/libzip/zip_buffer.c
ext/libzip/zip_close.c
ext/libzip/zip_delete.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_dir_add.c
ext/libzip/zip_dirent.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_discard.c
ext/libzip/zip_entry.c
ext/libzip/zip_error.c
ext/libzip/zip_error_clear.c
ext/libzip/zip_error_get.c
ext/libzip/zip_error_get_sys_type.c
ext/libzip/zip_error_strerror.c
ext/libzip/zip_error_to_str.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_extra_field.c
ext/libzip/zip_extra_field_api.c
ext/libzip/zip_fclose.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_fdopen.c
ext/libzip/zip_file_add.c
ext/libzip/zip_file_error_clear.c
ext/libzip/zip_file_error_get.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_file_get_comment.c
ext/libzip/zip_file_get_external_attributes.c
ext/libzip/zip_file_get_offset.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_file_rename.c
ext/libzip/zip_file_replace.c
ext/libzip/zip_file_set_comment.c
ext/libzip/zip_file_set_encryption.c
ext/libzip/zip_file_set_external_attributes.c
ext/libzip/zip_file_set_mtime.c
ext/libzip/zip_file_strerror.c
ext/libzip/zip_fopen.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_fopen_encrypted.c
ext/libzip/zip_fopen_index.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_fopen_index_encrypted.c
ext/libzip/zip_fread.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_fseek.c
ext/libzip/zip_ftell.c
ext/libzip/zip_get_archive_comment.c
ext/libzip/zip_get_archive_flag.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_get_encryption_implementation.c
ext/libzip/zip_get_file_comment.c
ext/libzip/zip_get_name.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_get_num_entries.c
ext/libzip/zip_get_num_files.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_hash.c
ext/libzip/zip_io_util.c
ext/libzip/zip_libzip_version.c
ext/libzip/zip_memdup.c
ext/libzip/zip_name_locate.c
ext/libzip/zip_new.c
ext/libzip/zip_open.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_pkware.c
ext/libzip/zip_progress.c
ext/libzip/zip_rename.c
ext/libzip/zip_replace.c
ext/libzip/zip_set_archive_comment.c
ext/libzip/zip_set_archive_flag.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_set_default_password.c
ext/libzip/zip_set_file_comment.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_set_file_compression.c
ext/libzip/zip_set_name.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_source_accept_empty.c
ext/libzip/zip_source_begin_write.c
ext/libzip/zip_source_begin_write_cloning.c
ext/libzip/zip_source_buffer.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_source_call.c
ext/libzip/zip_source_close.c
ext/libzip/zip_source_commit_write.c
ext/libzip/zip_source_compress.c
ext/libzip/zip_source_crc.c
ext/libzip/zip_source_error.c
ext/libzip/zip_source_file_common.c
ext/libzip/zip_source_file_stdio.c
ext/libzip/zip_source_free.c
ext/libzip/zip_source_function.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_source_get_file_attributes.c
ext/libzip/zip_source_is_deleted.c
ext/libzip/zip_source_layered.c
ext/libzip/zip_source_open.c
ext/libzip/zip_source_pkware_decode.c
ext/libzip/zip_source_pkware_encode.c
ext/libzip/zip_source_read.c
ext/libzip/zip_source_remove.c
ext/libzip/zip_source_rollback_write.c
ext/libzip/zip_source_seek.c
ext/libzip/zip_source_seek_write.c
ext/libzip/zip_source_stat.c
ext/libzip/zip_source_supports.c
ext/libzip/zip_source_tell.c
ext/libzip/zip_source_tell_write.c
ext/libzip/zip_source_window.c
ext/libzip/zip_source_write.c
ext/libzip/zip_source_zip.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_source_zip_new.c
ext/libzip/zip_stat.c
ext/libzip/zip_stat_index.c
ext/libzip/zip_stat_init.c
ext/libzip/zip_strerror.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_string.c
ext/libzip/zip_unchange.c
ext/libzip/zip_unchange_all.c
ext/libzip/zip_unchange_archive.c
ext/libzip/zip_unchange_data.c
2021-05-10 02:58:30 +00:00
ext/libzip/zip_utf-8.c
ext/libzip/zip_err_str.c
)
2021-05-10 02:58:30 +00:00
if(WIN32)
target_sources(libzip PRIVATE
ext/libzip/zip_source_file_win32.c
ext/libzip/zip_source_file_win32_named.c
ext/libzip/zip_source_file_win32_utf16.c
ext/libzip/zip_source_file_win32_utf8.c
)
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES WindowsStore)
target_sources(libzip PRIVATE ext/libzip/zip_random_uwp.c)
else()
target_sources(libzip PRIVATE ext/libzip/zip_source_file_win32_ansi.c ext/libzip/zip_random_win32.c)
endif()
else()
target_sources(libzip PRIVATE
ext/libzip/zip_mkstempm.c
ext/libzip/zip_source_file_stdio_named.c
ext/libzip/zip_random_unix.c
)
endif()
target_link_libraries(libzip)
include_directories(ext/libzip)
set(LIBZIP_LIBRARY libzip)
endif()
# Arm platforms require at least libpng17.
if(ANDROID OR ARMV7 OR ARM64 OR ARM OR IOS)
set(PNG_REQUIRED_VERSION 1.7)
else()
set(PNG_REQUIRED_VERSION 1.6)
endif()
if(USE_SYSTEM_LIBPNG)
find_package(PNG ${PNG_REQUIRED_VERSION})
endif()
if(PNG_FOUND)
include_directories(${PNG_INCLUDE_DIRS})
2013-12-07 15:42:17 +00:00
else()
if(ARM)
2016-10-11 01:27:54 +00:00
set(PNG_ARM_INCLUDES
ext/libpng17/arm/arm_init.c
ext/libpng17/arm/filter_neon.S
ext/libpng17/arm/filter_neon_intrinsics.c
)
elseif(ARM64)
set(PNG_ARM_INCLUDES
ext/libpng17/arm/arm_init.c
ext/libpng17/arm/filter_neon_intrinsics.c
)
endif()
add_library(png17 STATIC
ext/libpng17/pngconf.h
ext/libpng17/pngdebug.h
ext/libpng17/png.c
ext/libpng17/png.h
ext/libpng17/pngerror.c
ext/libpng17/pngget.c
ext/libpng17/pnginfo.h
ext/libpng17/pnglibconf.h
ext/libpng17/pngmem.c
ext/libpng17/pngpread.c
ext/libpng17/pngpriv.h
ext/libpng17/pngread.c
ext/libpng17/pngrio.c
ext/libpng17/pngrtran.c
ext/libpng17/pngrutil.c
ext/libpng17/pngset.c
ext/libpng17/pngstruct.h
ext/libpng17/pngtrans.c
ext/libpng17/pngwio.c
ext/libpng17/pngwrite.c
ext/libpng17/pngwtran.c
ext/libpng17/pngwutil.c
${PNG_ARM_INCLUDES}
)
set(PNG_LIBRARIES png17)
include_directories(ext/libpng17)
2013-12-07 15:42:17 +00:00
endif()
add_library(basis_universal STATIC
ext/basis_universal/basisu.h
ext/basis_universal/basisu_containers.h
ext/basis_universal/basisu_containers_impl.h
ext/basis_universal/basisu_file_headers.h
ext/basis_universal/basisu_transcoder.cpp
ext/basis_universal/basisu_transcoder.h
ext/basis_universal/basisu_transcoder_internal.h
ext/basis_universal/basisu_transcoder_tables_astc.inc
ext/basis_universal/basisu_transcoder_tables_astc_0_255.inc
ext/basis_universal/basisu_transcoder_tables_atc_55.inc
ext/basis_universal/basisu_transcoder_tables_atc_56.inc
ext/basis_universal/basisu_transcoder_tables_bc7_m5_alpha.inc
ext/basis_universal/basisu_transcoder_tables_bc7_m5_color.inc
ext/basis_universal/basisu_transcoder_tables_dxt1_5.inc
ext/basis_universal/basisu_transcoder_tables_dxt1_6.inc
ext/basis_universal/basisu_transcoder_tables_pvrtc2_45.inc
ext/basis_universal/basisu_transcoder_tables_pvrtc2_alpha_33.inc
ext/basis_universal/basisu_transcoder_uastc.h
)
set(BASISU_LIBRARIES basis_universal)
set(nativeExtra)
set(nativeExtraLibs)
2014-03-22 14:18:01 +00:00
if(ANDROID)
set(nativeExtra ${nativeExtra}
Common/GL/GLInterface/EGLAndroid.cpp
Common/GL/GLInterface/EGLAndroid.h
Common/GL/GLInterface/EGL.cpp
Common/GL/GLInterface/EGL.h
Common/GL/GLInterface/GLInterface.cpp
Common/GL/GLInterfaceBase.h
)
set(NativeAppSource ${NativeAppSource}
android/jni/app-android.cpp
android/jni/AndroidJavaGLContext.cpp
android/jni/AndroidJavaGLContext.h
android/jni/AndroidVulkanContext.cpp
android/jni/AndroidVulkanContext.h
android/jni/AndroidGraphicsContext.h
android/jni/AndroidAudio.cpp
android/jni/AndroidAudio.h
android/jni/OpenSLContext.cpp
android/jni/OpenSLContext.h
)
2022-07-07 17:30:06 +00:00
if (OPENXR)
2022-07-08 12:44:20 +00:00
set(nativeExtraLibs ${nativeExtraLibs} openxr)
2022-07-07 17:30:06 +00:00
endif()
# No target
2023-02-07 04:36:55 +00:00
elseif(IOS AND NOT LIBRETRO)
set(nativeExtra ${nativeExtra}
2013-08-19 03:17:33 +00:00
ios/main.mm
ios/AppDelegate.mm
ios/AppDelegate.h
ios/DisplayManager.h
ios/DisplayManager.mm
ios/ViewController.mm
2013-03-16 14:50:55 +00:00
ios/ViewController.h
ios/iOSCoreAudio.mm
ios/iOSCoreAudio.h
ios/CameraHelper.mm
ios/CameraHelper.h
ios/LocationHelper.mm
ios/LocationHelper.h
2017-09-04 07:46:05 +00:00
ios/PPSSPPUIApplication.h
ios/PPSSPPUIApplication.mm
ios/SmartKeyboardMap.cpp
ios/SmartKeyboardMap.hpp
2013-05-31 01:58:41 +00:00
ios/iCade/iCadeReaderView.h
ios/iCade/iCadeReaderView.m
ios/iCade/iCadeState.h
UI/DarwinFileSystemServices.mm
UI/DarwinFileSystemServices.h
Common/Battery/AppleBatteryClient.m
)
2023-03-06 14:30:39 +00:00
2023-01-22 17:32:34 +00:00
set(nativeExtraLibs ${nativeExtraLibs} "-framework Foundation -framework MediaPlayer -framework AudioToolbox -framework CoreGraphics -framework QuartzCore -framework UIKit -framework GLKit -framework OpenAL -framework AVFoundation -framework CoreLocation -framework CoreVideo -framework CoreMedia -framework CoreServices" )
if(EXISTS "${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks/GameController.framework")
set(nativeExtraLibs ${nativeExtraLibs} "-weak_framework GameController")
endif()
if(NOT ICONV_LIBRARY)
set(nativeExtraLibs ${nativeExtraLibs} iconv)
endif()
set_source_files_properties(ios/AppDelegate.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(ios/ViewController.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(ios/iOSCoreAudio.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(ios/PPSSPPUIApplication.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(ios/iCade/iCadeReaderView.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(ios/main.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(ios/CameraHelper.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(ios/LocationHelper.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(UI/DarwinFileSystemServices.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(Common/Battery/AppleBatteryClient.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
set(TargetBin PPSSPP)
2023-02-07 04:36:55 +00:00
elseif(IOS AND LIBRETRO)
set(nativeExtraLibs ${nativeExtraLibs} "-framework GLKit")
2012-12-16 11:17:13 +00:00
elseif(USING_QT_UI)
set(CMAKE_AUTOMOC ON)
find_package(Qt5 COMPONENTS OpenGL Gui Core Multimedia)
list(APPEND NativeAppSource
Qt/QtMain.cpp
Qt/QtMain.h
Qt/mainwindow.cpp
Qt/mainwindow.h
)
add_definitions(-DUSING_QT_UI)
if(USING_GLES2)
add_definitions(-DQT_OPENGL_ES -DQT_OPENGL_ES_2)
endif()
if(APPLE)
list(APPEND NativeAppSource
UI/DarwinFileSystemServices.mm
UI/DarwinFileSystemServices.h
Common/Battery/AppleBatteryClient.m)
set_source_files_properties(Common/Battery/AppleBatteryClient.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(UI/DarwinFileSystemServices.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY} ${QUARTZ_CORE_LIBRARY} ${IOKIT_LIBRARY})
endif()
include_directories(Qt)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(nativeExtraLibs ${nativeExtraLibs} Qt5::OpenGL Qt5::Gui Qt5::Core Qt5::Multimedia)
2012-12-16 11:17:13 +00:00
set(TargetBin PPSSPPQt)
# Enable SDL joystick if SDL is found
if(SDL2_FOUND)
add_definitions(-DSDL)
set(nativeExtra ${nativeExtra}
SDL/SDLJoystick.h
SDL/SDLJoystick.cpp
)
set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2)
endif()
elseif(WIN32)
# Don't care about SDL.
set(TargetBin PPSSPPWindows)
if(X86_64)
link_directories(dx9sdk/Lib/x64)
else()
link_directories(dx9sdk/Lib/x86)
endif()
elseif(LIBRETRO)
else()
if(GOLD)
set(TargetBin PPSSPPGold)
else()
set(TargetBin PPSSPPSDL)
endif()
# Require SDL
add_definitions(-DSDL)
set(nativeExtra ${nativeExtra}
SDL/SDLJoystick.h
SDL/SDLJoystick.cpp
SDL/SDLMain.cpp
SDL/SDLGLGraphicsContext.cpp
)
2022-04-02 23:34:13 +00:00
if(NOT USE_LIBNX)
set(nativeExtra ${nativeExtra}
SDL/SDLVulkanGraphicsContext.cpp
)
endif()
if(APPLE)
2023-04-23 19:12:15 +00:00
set(nativeExtra ${nativeExtra}
SDL/SDLMain.h
SDL/SDLMain.mm
SDL/SDLCocoaMetalLayer.h
SDL/SDLCocoaMetalLayer.mm
SDL/CocoaBarItems.mm
SDL/CocoaBarItems.h
SDL/PPSSPPAboutViewController.m
SDL/PPSSPPAboutViewController.h
UI/DarwinFileSystemServices.mm
UI/DarwinFileSystemServices.h
Common/Battery/AppleBatteryClient.m
UI/PSPNSApplicationDelegate.mm
UI/PSPNSApplicationDelegate.h)
set_source_files_properties(UI/DarwinFileSystemServices.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(UI/PSPNSApplicationDelegate.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
2023-02-14 16:11:32 +00:00
set_source_files_properties(SDL/CocoaBarItems.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
2023-04-23 19:12:15 +00:00
set_source_files_properties(SDL/PPSSPPAboutViewController.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
set_source_files_properties(Common/Battery/AppleBatteryClient.m PROPERTIES COMPILE_FLAGS -fobjc-arc)
set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY} ${QUARTZ_CORE_LIBRARY} ${IOKIT_LIBRARY})
2023-05-05 21:17:45 +00:00
if(USE_SYSTEM_LIBSDL2)
set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2)
else()
set(nativeExtraLibs ${nativeExtraLibs} ${SDL2Fwk})
endif()
elseif(USING_EGL)
set(nativeExtraLibs ${nativeExtraLibs} pthread SDL2::SDL2)
else()
set(nativeExtraLibs ${nativeExtraLibs} SDL2::SDL2)
endif()
endif()
if(WIN32)
if(MINGW)
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <INCLUDES> <SOURCE> <OBJECT>")
# required when using the dx9sdk include paths
add_definitions(-include ${CMAKE_CURRENT_SOURCE_DIR}/Windows/mingw_defines.h)
else()
target_link_libraries(Common dxguid)
endif()
target_link_libraries(Common winmm d3d9 dsound)
endif()
if(NOT LIBRETRO)
list(APPEND NativeAppSource
UI/AudioCommon.h
UI/AudioCommon.cpp
)
endif()
list(APPEND NativeAppSource
2014-08-23 12:24:24 +00:00
android/jni/TestRunner.cpp
UI/DiscordIntegration.cpp
2014-06-27 16:49:50 +00:00
UI/NativeApp.cpp
2021-06-06 08:19:17 +00:00
UI/BackgroundAudio.h
2014-06-27 16:49:50 +00:00
UI/BackgroundAudio.cpp
2021-06-06 08:19:17 +00:00
UI/ChatScreen.h
2016-10-25 10:42:51 +00:00
UI/ChatScreen.cpp
2014-06-27 16:49:50 +00:00
UI/DevScreens.cpp
2021-06-06 08:19:17 +00:00
UI/DevScreens.h
UI/DisplayLayoutScreen.cpp
2021-06-06 08:19:17 +00:00
UI/DisplayLayoutScreen.h
UI/EmuScreen.h
2014-06-27 16:49:50 +00:00
UI/EmuScreen.cpp
2021-06-06 08:19:17 +00:00
UI/GameInfoCache.h
2014-06-27 16:49:50 +00:00
UI/GameInfoCache.cpp
2021-06-06 08:19:17 +00:00
UI/MainScreen.h
2014-06-27 16:49:50 +00:00
UI/MainScreen.cpp
2021-06-06 08:19:17 +00:00
UI/MiscScreens.h
2014-06-27 16:49:50 +00:00
UI/MiscScreens.cpp
2021-06-06 08:19:17 +00:00
UI/PauseScreen.h
2014-12-22 09:48:17 +00:00
UI/PauseScreen.cpp
2021-06-06 08:19:17 +00:00
UI/GameScreen.h
2014-06-27 16:49:50 +00:00
UI/GameScreen.cpp
2021-06-06 08:19:17 +00:00
UI/GameSettingsScreen.h
2014-06-27 16:49:50 +00:00
UI/GameSettingsScreen.cpp
2021-06-06 08:19:17 +00:00
UI/GPUDriverTestScreen.h
2018-12-19 13:01:19 +00:00
UI/GPUDriverTestScreen.cpp
2021-06-06 08:19:17 +00:00
UI/TiltAnalogSettingsScreen.h
2014-06-27 16:49:50 +00:00
UI/TiltAnalogSettingsScreen.cpp
2021-06-06 08:19:17 +00:00
UI/TouchControlLayoutScreen.h
2014-06-27 16:49:50 +00:00
UI/TouchControlLayoutScreen.cpp
2021-06-06 08:19:17 +00:00
UI/TouchControlVisibilityScreen.h
2014-06-27 16:49:50 +00:00
UI/TouchControlVisibilityScreen.cpp
2021-06-06 08:19:17 +00:00
UI/GamepadEmu.h
2014-06-27 16:49:50 +00:00
UI/GamepadEmu.cpp
2023-02-01 13:58:16 +00:00
UI/JoystickHistoryView.h
UI/JoystickHistoryView.cpp
2021-06-06 08:19:17 +00:00
UI/OnScreenDisplay.h
2014-06-27 16:49:50 +00:00
UI/OnScreenDisplay.cpp
2021-06-06 08:19:17 +00:00
UI/ControlMappingScreen.h
2014-06-27 16:49:50 +00:00
UI/ControlMappingScreen.cpp
2021-06-06 08:19:17 +00:00
UI/RemoteISOScreen.h
UI/RemoteISOScreen.cpp
2021-06-06 08:19:17 +00:00
UI/ReportScreen.h
UI/ReportScreen.cpp
2021-06-06 08:19:17 +00:00
UI/SavedataScreen.h
UI/SavedataScreen.cpp
2021-06-06 08:19:17 +00:00
UI/Store.h
2014-06-27 16:49:50 +00:00
UI/Store.cpp
2021-06-06 08:19:17 +00:00
UI/CwCheatScreen.h
2014-06-27 16:49:50 +00:00
UI/CwCheatScreen.cpp
2021-06-06 08:19:17 +00:00
UI/InstallZipScreen.h
2014-06-27 16:49:50 +00:00
UI/InstallZipScreen.cpp
2021-06-06 08:19:17 +00:00
UI/MemStickScreen.h
2021-04-24 20:47:57 +00:00
UI/MemStickScreen.cpp
2021-06-06 08:19:17 +00:00
UI/ProfilerDraw.h
2015-10-14 15:45:21 +00:00
UI/ProfilerDraw.cpp
2023-03-26 09:21:34 +00:00
UI/CustomButtonMappingScreen.h
UI/CustomButtonMappingScreen.cpp
2022-02-11 11:32:23 +00:00
UI/Theme.h
UI/Theme.cpp
)
2014-06-27 16:49:50 +00:00
if(ANDROID)
if(ARM)
2014-06-27 16:49:50 +00:00
set(NativeAppSource ${NativeAppSource} android/jni/ArmEmitterTest.cpp)
elseif(ARM64)
set(NativeAppSource ${NativeAppSource} android/jni/Arm64EmitterTest.cpp)
2014-06-27 16:49:50 +00:00
endif()
if (NOT LIBRETRO)
set(nativeExtra ${nativeExtra} ${NativeAppSource})
endif()
2014-06-27 16:49:50 +00:00
endif()
2022-12-06 17:23:09 +00:00
if (IOS)
set(nativeExtra ${nativeExtra} ${NativeAppSource})
endif()
add_library(native STATIC
${nativeExtra}
Common/Render/Text/draw_text_qt.cpp
Common/Render/Text/draw_text_qt.h
ext/jpge/jpgd.cpp
ext/jpge/jpgd.h
ext/jpge/jpge.cpp
ext/jpge/jpge.h
)
2013-12-19 10:10:46 +00:00
if(LINUX AND NOT ANDROID)
set(RT_LIB rt)
2013-12-19 10:10:46 +00:00
endif()
set(ATOMIC_LIB)
2023-03-02 06:20:49 +00:00
if(ANDROID OR (LINUX AND ARM_DEVICE) OR (LINUX AND RISCV64))
set(ATOMIC_LIB atomic)
endif()
target_link_libraries(native ${LIBZIP_LIBRARY} ${PNG_LIBRARIES} ${BASISU_LIBRARIES} ${ZLIB_LIBRARY} vma gason udis86 ${RT_LIB} ${nativeExtraLibs} ${ATOMIC_LIB} Common)
2017-01-10 00:19:58 +00:00
if(TARGET Ext::GLEW)
target_link_libraries(native Ext::GLEW)
2016-10-12 15:30:18 +00:00
endif()
if(ANDROID)
target_link_libraries(native log EGL OpenSLES)
elseif(WIN32)
target_link_libraries(native ws2_32 winmm)
2018-10-27 17:55:55 +00:00
elseif(${CMAKE_SYSTEM_NAME} MATCHES "^(DragonFly|FreeBSD|NetBSD)$")
target_link_libraries(native execinfo)
endif()
add_library(kirk STATIC
ext/libkirk/AES.c
ext/libkirk/AES.h
ext/libkirk/amctrl.c
ext/libkirk/amctrl.h
ext/libkirk/SHA1.c
ext/libkirk/SHA1.h
ext/libkirk/bn.c
ext/libkirk/ec.c
ext/libkirk/kirk_engine.c
ext/libkirk/kirk_engine.h
)
target_include_directories(kirk PRIVATE ext/libkirk)
2015-02-15 05:22:20 +00:00
add_library(sfmt19937 STATIC
ext/sfmt19937/SFMT.c
ext/sfmt19937/SFMT.h
ext/sfmt19937/SFMT-common.h
ext/sfmt19937/SFMT-params.h
ext/sfmt19937/SFMT-params19937.h
)
2022-12-04 15:53:15 +00:00
target_compile_definitions(sfmt19937 PRIVATE SFMT_MEXP=19937)
target_include_directories(sfmt19937 PRIVATE ext/sfmt19937)
2015-02-15 05:22:20 +00:00
2013-04-30 16:44:20 +00:00
add_library(xbrz STATIC
ext/xbrz/xbrz.cpp
ext/xbrz/xbrz.h
)
target_include_directories(xbrz PRIVATE ext/xbrz)
2013-04-30 16:44:20 +00:00
add_library(xxhash STATIC
ext/xxhash.c
ext/xxhash.h
)
target_include_directories(xxhash PRIVATE ext/xxhash)
set(CoreExtra)
set(CoreExtraLibs)
set(CoreExtra ${CoreExtra}
Core/MIPS/IR/IRCompALU.cpp
Core/MIPS/IR/IRCompBranch.cpp
Core/MIPS/IR/IRCompFPU.cpp
Core/MIPS/IR/IRCompLoadStore.cpp
Core/MIPS/IR/IRCompVFPU.cpp
Core/MIPS/IR/IRFrontend.cpp
Core/MIPS/IR/IRFrontend.h
Core/MIPS/IR/IRInst.cpp
Core/MIPS/IR/IRInst.h
Core/MIPS/IR/IRInterpreter.cpp
Core/MIPS/IR/IRInterpreter.h
Core/MIPS/IR/IRJit.cpp
Core/MIPS/IR/IRJit.h
Core/MIPS/IR/IRPassSimplify.cpp
Core/MIPS/IR/IRPassSimplify.h
Core/MIPS/IR/IRRegCache.cpp
Core/MIPS/IR/IRRegCache.h
)
list(APPEND CoreExtra
Core/MIPS/ARM/ArmAsm.cpp
Core/MIPS/ARM/ArmCompALU.cpp
Core/MIPS/ARM/ArmCompBranch.cpp
Core/MIPS/ARM/ArmCompFPU.cpp
Core/MIPS/ARM/ArmCompLoadStore.cpp
Core/MIPS/ARM/ArmCompVFPU.cpp
Core/MIPS/ARM/ArmCompVFPUNEON.cpp
Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp
Core/MIPS/ARM/ArmCompReplace.cpp
Core/MIPS/ARM/ArmJit.cpp
Core/MIPS/ARM/ArmJit.h
Core/MIPS/ARM/ArmRegCache.cpp
Core/MIPS/ARM/ArmRegCache.h
Core/MIPS/ARM/ArmRegCacheFPU.cpp
Core/MIPS/ARM/ArmRegCacheFPU.h
GPU/Common/VertexDecoderArm.cpp
)
list(APPEND CoreExtra
Core/MIPS/ARM64/Arm64Asm.cpp
Core/MIPS/ARM64/Arm64CompALU.cpp
Core/MIPS/ARM64/Arm64CompBranch.cpp
Core/MIPS/ARM64/Arm64CompFPU.cpp
Core/MIPS/ARM64/Arm64CompLoadStore.cpp
Core/MIPS/ARM64/Arm64CompVFPU.cpp
Core/MIPS/ARM64/Arm64CompReplace.cpp
Core/MIPS/ARM64/Arm64Jit.cpp
Core/MIPS/ARM64/Arm64Jit.h
Core/MIPS/ARM64/Arm64RegCache.cpp
Core/MIPS/ARM64/Arm64RegCache.h
Core/MIPS/ARM64/Arm64RegCacheFPU.cpp
Core/MIPS/ARM64/Arm64RegCacheFPU.h
GPU/Common/VertexDecoderArm64.cpp
Core/Util/DisArm64.cpp
)
list(APPEND CoreExtra
Core/MIPS/x86/Asm.cpp
Core/MIPS/x86/CompALU.cpp
Core/MIPS/x86/CompBranch.cpp
Core/MIPS/x86/CompFPU.cpp
Core/MIPS/x86/CompLoadStore.cpp
Core/MIPS/x86/CompVFPU.cpp
Core/MIPS/x86/CompReplace.cpp
Core/MIPS/x86/Jit.cpp
Core/MIPS/x86/Jit.h
Core/MIPS/x86/JitSafeMem.cpp
Core/MIPS/x86/JitSafeMem.h
Core/MIPS/x86/RegCache.cpp
Core/MIPS/x86/RegCache.h
Core/MIPS/x86/RegCacheFPU.cpp
Core/MIPS/x86/RegCacheFPU.h
GPU/Common/VertexDecoderX86.cpp
GPU/Software/DrawPixelX86.cpp
2017-05-11 00:31:34 +00:00
GPU/Software/SamplerX86.cpp
)
list(APPEND CoreExtra
Core/MIPS/MIPS/MipsJit.cpp
Core/MIPS/MIPS/MipsJit.h
)
2023-02-12 21:31:39 +00:00
list(APPEND CoreExtra
GPU/Common/VertexDecoderRiscV.cpp
)
if(NOT MOBILE_DEVICE)
2016-09-02 00:09:56 +00:00
set(CoreExtra ${CoreExtra}
Core/AVIDump.cpp
2016-09-03 22:26:01 +00:00
Core/AVIDump.h
Core/WaveFile.cpp
Core/WaveFile.h
)
2016-09-02 00:09:56 +00:00
endif()
set(GPU_GLES
GPU/GLES/StencilBufferGLES.cpp
GPU/GLES/GPU_GLES.cpp
GPU/GLES/GPU_GLES.h
GPU/GLES/FragmentTestCacheGLES.cpp
GPU/GLES/FragmentTestCacheGLES.h
2017-01-22 06:28:44 +00:00
GPU/GLES/FramebufferManagerGLES.cpp
GPU/GLES/FramebufferManagerGLES.h
GPU/GLES/ShaderManagerGLES.cpp
GPU/GLES/ShaderManagerGLES.h
GPU/GLES/StateMappingGLES.cpp
GPU/GLES/StateMappingGLES.h
GPU/GLES/TextureCacheGLES.cpp
GPU/GLES/TextureCacheGLES.h
GPU/GLES/DrawEngineGLES.cpp
GPU/GLES/DrawEngineGLES.h
)
set(GPU_VULKAN
GPU/Vulkan/DebugVisVulkan.cpp
GPU/Vulkan/DebugVisVulkan.h
GPU/Vulkan/DrawEngineVulkan.cpp
GPU/Vulkan/DrawEngineVulkan.h
GPU/Vulkan/FramebufferManagerVulkan.cpp
GPU/Vulkan/FramebufferManagerVulkan.h
GPU/Vulkan/GPU_Vulkan.cpp
GPU/Vulkan/GPU_Vulkan.h
GPU/Vulkan/PipelineManagerVulkan.cpp
GPU/Vulkan/PipelineManagerVulkan.h
GPU/Vulkan/ShaderManagerVulkan.cpp
GPU/Vulkan/ShaderManagerVulkan.h
GPU/Vulkan/StateMappingVulkan.cpp
GPU/Vulkan/StateMappingVulkan.h
GPU/Vulkan/TextureCacheVulkan.cpp
GPU/Vulkan/TextureCacheVulkan.h
GPU/Vulkan/VulkanUtil.cpp
GPU/Vulkan/VulkanUtil.h
)
set(GPU_D3D9
GPU/Directx9/DrawEngineDX9.cpp
GPU/Directx9/DrawEngineDX9.h
GPU/Directx9/FramebufferManagerDX9.cpp
GPU/Directx9/FramebufferManagerDX9.h
GPU/Directx9/GPU_DX9.cpp
GPU/Directx9/GPU_DX9.h
GPU/Directx9/ShaderManagerDX9.cpp
GPU/Directx9/ShaderManagerDX9.h
GPU/Directx9/StateMappingDX9.cpp
GPU/Directx9/StateMappingDX9.h
GPU/Directx9/TextureCacheDX9.cpp
GPU/Directx9/TextureCacheDX9.h
)
2017-02-08 16:47:07 +00:00
set(GPU_D3D11
GPU/D3D11/DrawEngineD3D11.cpp
GPU/D3D11/DrawEngineD3D11.h
GPU/D3D11/FramebufferManagerD3D11.cpp
GPU/D3D11/FramebufferManagerD3D11.h
GPU/D3D11/GPU_D3D11.cpp
GPU/D3D11/GPU_D3D11.h
2017-02-16 16:06:03 +00:00
GPU/D3D11/D3D11Util.cpp
GPU/D3D11/D3D11Util.h
2017-02-08 16:47:07 +00:00
GPU/D3D11/ShaderManagerD3D11.cpp
GPU/D3D11/ShaderManagerD3D11.h
GPU/D3D11/StateMappingD3D11.cpp
GPU/D3D11/StateMappingD3D11.h
GPU/D3D11/TextureCacheD3D11.cpp
GPU/D3D11/TextureCacheD3D11.h
)
2018-01-29 23:24:27 +00:00
# We build Vulkan even on Apple to avoid annoying build differences.
set(GPU_IMPLS ${GPU_GLES} ${GPU_VULKAN})
if(WIN32)
2017-02-08 16:47:07 +00:00
list(APPEND GPU_IMPLS ${GPU_D3D9} ${GPU_D3D11})
endif()
2016-10-12 14:46:29 +00:00
set(GPU_SOURCES
${GPU_IMPLS}
${GPU_NEON}
2022-08-03 09:42:37 +00:00
GPU/Common/Draw2D.cpp
GPU/Common/Draw2D.h
GPU/Common/DepthBufferCommon.cpp
GPU/Common/TextureShaderCommon.cpp
GPU/Common/TextureShaderCommon.h
2016-10-12 14:46:29 +00:00
GPU/Common/DepalettizeShaderCommon.cpp
GPU/Common/DepalettizeShaderCommon.h
GPU/Common/FragmentShaderGenerator.cpp
GPU/Common/FragmentShaderGenerator.h
GPU/Common/VertexShaderGenerator.cpp
GPU/Common/VertexShaderGenerator.h
GPU/Common/GeometryShaderGenerator.cpp
GPU/Common/GeometryShaderGenerator.h
GPU/Common/FramebufferManagerCommon.cpp
GPU/Common/FramebufferManagerCommon.h
2016-10-12 14:46:29 +00:00
GPU/Common/GPUDebugInterface.cpp
GPU/Common/GPUDebugInterface.h
GPU/Common/GPUStateUtils.cpp
GPU/Common/GPUStateUtils.h
GPU/Common/DrawEngineCommon.cpp
GPU/Common/DrawEngineCommon.h
GPU/Common/PresentationCommon.cpp
GPU/Common/PresentationCommon.h
GPU/Common/ReinterpretFramebuffer.cpp
GPU/Common/ReinterpretFramebuffer.h
2016-10-12 14:46:29 +00:00
GPU/Common/ShaderId.cpp
GPU/Common/ShaderId.h
2017-02-16 16:06:03 +00:00
GPU/Common/ShaderUniforms.cpp
GPU/Common/ShaderUniforms.h
2017-03-13 15:51:36 +00:00
GPU/Common/ShaderCommon.cpp
GPU/Common/ShaderCommon.h
2016-10-12 14:46:29 +00:00
GPU/Common/SplineCommon.cpp
GPU/Common/SplineCommon.h
2017-11-01 13:49:50 +00:00
GPU/Common/StencilCommon.cpp
GPU/Common/StencilCommon.h
2016-10-12 14:46:29 +00:00
GPU/Common/SoftwareTransformCommon.cpp
GPU/Common/SoftwareTransformCommon.h
GPU/Common/VertexDecoderCommon.cpp
GPU/Common/VertexDecoderCommon.h
GPU/Common/TransformCommon.cpp
GPU/Common/TransformCommon.h
GPU/Common/IndexGenerator.cpp
GPU/Common/IndexGenerator.h
GPU/Common/TextureDecoder.cpp
GPU/Common/TextureDecoder.h
GPU/Common/TextureCacheCommon.cpp
GPU/Common/TextureCacheCommon.h
GPU/Common/TextureScalerCommon.cpp
GPU/Common/TextureScalerCommon.h
GPU/Common/PostShader.cpp
GPU/Common/PostShader.h
GPU/Common/TextureReplacer.cpp
GPU/Common/TextureReplacer.h
GPU/Common/ReplacedTexture.cpp
GPU/Common/ReplacedTexture.h
2016-10-12 14:46:29 +00:00
GPU/Debugger/Breakpoints.cpp
GPU/Debugger/Breakpoints.h
GPU/Debugger/Debugger.cpp
GPU/Debugger/Debugger.h
GPU/Debugger/GECommandTable.cpp
GPU/Debugger/GECommandTable.h
GPU/Debugger/Playback.cpp
GPU/Debugger/Playback.h
GPU/Debugger/Record.cpp
GPU/Debugger/Record.h
GPU/Debugger/RecordFormat.h
2016-10-12 14:46:29 +00:00
GPU/Debugger/Stepping.cpp
GPU/Debugger/Stepping.h
GPU/ge_constants.h
GPU/GeConstants.cpp
2016-10-12 14:46:29 +00:00
GPU/GPUInterface.h
GPU/GeDisasm.cpp
GPU/GeDisasm.h
GPU/GPU.cpp
GPU/GPU.h
GPU/GPUCommon.cpp
GPU/GPUCommon.h
2023-02-25 13:24:59 +00:00
GPU/GPUCommonHW.cpp
GPU/GPUCommonHW.h
2016-10-12 14:46:29 +00:00
GPU/GPUState.cpp
GPU/GPUState.h
GPU/Math3D.cpp
GPU/Math3D.h
GPU/Software/BinManager.cpp
GPU/Software/BinManager.h
2016-10-12 14:46:29 +00:00
GPU/Software/Clipper.cpp
GPU/Software/Clipper.h
GPU/Software/DrawPixel.cpp
GPU/Software/DrawPixel.h
GPU/Software/FuncId.cpp
GPU/Software/FuncId.h
2016-10-12 14:46:29 +00:00
GPU/Software/Lighting.cpp
GPU/Software/Lighting.h
GPU/Software/Rasterizer.cpp
GPU/Software/Rasterizer.h
GPU/Software/RasterizerRectangle.cpp
GPU/Software/RasterizerRectangle.h
GPU/Software/RasterizerRegCache.cpp
GPU/Software/RasterizerRegCache.h
GPU/Software/Sampler.cpp
GPU/Software/Sampler.h
2016-10-12 14:46:29 +00:00
GPU/Software/SoftGpu.cpp
GPU/Software/SoftGpu.h
GPU/Software/TransformUnit.cpp
GPU/Software/TransformUnit.h
)
2016-10-12 14:46:29 +00:00
# 'ppsspp_jni' on ANDROID, 'Core' everywhere else
# SHARED on ANDROID, STATIC everywhere else
add_library(${CoreLibName} ${CoreLinkType}
${CoreExtra}
${CommonJIT}
Core/Config.cpp
Core/Config.h
2023-04-05 09:35:46 +00:00
Core/ConfigSettings.cpp
Core/ConfigSettings.h
Core/ConfigValues.h
Core/ControlMapper.cpp
Core/ControlMapper.h
Core/Core.cpp
Core/Core.h
Core/Compatibility.cpp
Core/Compatibility.h
Core/CoreParameter.h
Core/CoreTiming.cpp
Core/CoreTiming.h
2013-05-31 05:42:27 +00:00
Core/CwCheat.cpp
Core/CwCheat.h
Core/HDRemaster.cpp
Core/HDRemaster.h
Core/Instance.cpp
Core/Instance.h
Core/KeyMap.cpp
Core/KeyMap.h
Core/KeyMapDefaults.cpp
Core/KeyMapDefaults.h
2013-08-10 16:08:31 +00:00
Core/ThreadEventQueue.h
Core/TiltEventProcessor.h
Core/TiltEventProcessor.cpp
Core/WebServer.cpp
Core/WebServer.h
Core/Debugger/Breakpoints.cpp
Core/Debugger/Breakpoints.h
Core/Debugger/DebugInterface.h
Core/Debugger/MemBlockInfo.cpp
Core/Debugger/MemBlockInfo.h
Core/Debugger/SymbolMap.cpp
Core/Debugger/SymbolMap.h
Core/Debugger/DisassemblyManager.cpp
Core/Debugger/DisassemblyManager.h
Core/Debugger/WebSocket.cpp
Core/Debugger/WebSocket.h
2018-05-03 13:20:20 +00:00
Core/Debugger/WebSocket/BreakpointSubscriber.cpp
Core/Debugger/WebSocket/BreakpointSubscriber.h
Core/Debugger/WebSocket/CPUCoreSubscriber.cpp
Core/Debugger/WebSocket/CPUCoreSubscriber.h
2018-04-23 03:35:24 +00:00
Core/Debugger/WebSocket/DisasmSubscriber.cpp
Core/Debugger/WebSocket/DisasmSubscriber.h
Core/Debugger/WebSocket/GameBroadcaster.cpp
Core/Debugger/WebSocket/GameBroadcaster.h
2018-04-22 01:26:36 +00:00
Core/Debugger/WebSocket/GameSubscriber.cpp
Core/Debugger/WebSocket/GameSubscriber.h
Core/Debugger/WebSocket/GPUBufferSubscriber.cpp
Core/Debugger/WebSocket/GPUBufferSubscriber.h
Core/Debugger/WebSocket/GPURecordSubscriber.cpp
Core/Debugger/WebSocket/GPURecordSubscriber.h
2021-09-19 21:24:43 +00:00
Core/Debugger/WebSocket/GPUStatsSubscriber.cpp
Core/Debugger/WebSocket/GPUStatsSubscriber.h
Core/Debugger/WebSocket/HLESubscriber.cpp
Core/Debugger/WebSocket/HLESubscriber.h
Core/Debugger/WebSocket/InputBroadcaster.cpp
Core/Debugger/WebSocket/InputBroadcaster.h
2021-01-19 00:58:34 +00:00
Core/Debugger/WebSocket/InputSubscriber.cpp
Core/Debugger/WebSocket/InputSubscriber.h
Core/Debugger/WebSocket/LogBroadcaster.cpp
Core/Debugger/WebSocket/LogBroadcaster.h
Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp
Core/Debugger/WebSocket/MemoryInfoSubscriber.h
Core/Debugger/WebSocket/MemorySubscriber.cpp
Core/Debugger/WebSocket/MemorySubscriber.h
Core/Debugger/WebSocket/ReplaySubscriber.cpp
Core/Debugger/WebSocket/ReplaySubscriber.h
Core/Debugger/WebSocket/SteppingBroadcaster.cpp
Core/Debugger/WebSocket/SteppingBroadcaster.h
Core/Debugger/WebSocket/SteppingSubscriber.cpp
Core/Debugger/WebSocket/SteppingSubscriber.h
Core/Debugger/WebSocket/WebSocketUtils.cpp
Core/Debugger/WebSocket/WebSocketUtils.h
Core/Dialog/PSPDialog.cpp
Core/Dialog/PSPDialog.h
2013-09-13 23:50:22 +00:00
Core/Dialog/PSPGamedataInstallDialog.cpp
Core/Dialog/PSPGamedataInstallDialog.h
Core/Dialog/PSPMsgDialog.cpp
Core/Dialog/PSPMsgDialog.h
2013-10-13 02:32:56 +00:00
Core/Dialog/PSPNetconfDialog.cpp
Core/Dialog/PSPNetconfDialog.h
Core/Dialog/PSPNpSigninDialog.cpp
Core/Dialog/PSPNpSigninDialog.h
Core/Dialog/PSPOskDialog.cpp
Core/Dialog/PSPOskDialog.h
Core/Dialog/PSPPlaceholderDialog.cpp
Core/Dialog/PSPPlaceholderDialog.h
Core/Dialog/PSPSaveDialog.cpp
Core/Dialog/PSPSaveDialog.h
Core/Dialog/PSPScreenshotDialog.cpp
Core/Dialog/PSPScreenshotDialog.h
Core/Dialog/SavedataParam.cpp
Core/Dialog/SavedataParam.h
Core/ELF/ElfReader.cpp
Core/ELF/ElfReader.h
Core/ELF/ElfTypes.h
2013-04-08 19:46:41 +00:00
Core/ELF/PBPReader.cpp
Core/ELF/PBPReader.h
Core/ELF/PrxDecrypter.cpp
Core/ELF/PrxDecrypter.h
Core/ELF/ParamSFO.cpp
Core/ELF/ParamSFO.h
Core/FileSystems/tlzrc.cpp
Core/FileSystems/BlobFileSystem.cpp
Core/FileSystems/BlobFileSystem.h
Core/FileSystems/BlockDevices.cpp
Core/FileSystems/BlockDevices.h
Core/FileSystems/DirectoryFileSystem.cpp
Core/FileSystems/DirectoryFileSystem.h
Core/FileSystems/FileSystem.h
Core/FileSystems/FileSystem.cpp
Core/FileSystems/ISOFileSystem.cpp
Core/FileSystems/ISOFileSystem.h
Core/FileSystems/MetaFileSystem.cpp
Core/FileSystems/MetaFileSystem.h
Core/FileSystems/VirtualDiscFileSystem.cpp
Core/FileSystems/VirtualDiscFileSystem.h
2013-02-28 16:13:01 +00:00
Core/Font/PGF.cpp
Core/Font/PGF.h
Core/HLE/FunctionWrappers.h
Core/HLE/HLE.cpp
Core/HLE/HLE.h
Core/HLE/ReplaceTables.cpp
Core/HLE/ReplaceTables.h
Core/HLE/HLEHelperThread.cpp
Core/HLE/HLEHelperThread.h
Core/HLE/HLETables.cpp
Core/HLE/HLETables.h
Core/HLE/KernelWaitHelpers.h
2016-08-28 12:55:25 +00:00
Core/HLE/KUBridge.h
Core/HLE/KUBridge.cpp
Core/HLE/Plugins.h
Core/HLE/Plugins.cpp
Core/HLE/ThreadQueueList.h
Core/HLE/__sceAudio.cpp
Core/HLE/__sceAudio.h
2015-02-08 01:35:00 +00:00
Core/HLE/sceAdler.cpp
Core/HLE/sceAdler.h
Core/HLE/sceAtrac.cpp
Core/HLE/sceAtrac.h
Core/HLE/sceAudio.cpp
2013-06-09 09:17:17 +00:00
Core/HLE/sceAudiocodec.cpp
Core/HLE/sceAudiocodec.h
2015-03-08 04:50:06 +00:00
Core/HLE/sceAudioRouting.cpp
Core/HLE/sceAudioRouting.h
Core/HLE/sceAudio.h
Core/HLE/sceCcc.h
Core/HLE/sceCcc.cpp
Core/HLE/sceChnnlsv.cpp
Core/HLE/sceChnnlsv.h
Core/HLE/sceCtrl.cpp
Core/HLE/sceCtrl.h
Core/HLE/sceDeflt.cpp
Core/HLE/sceDeflt.h
Core/HLE/sceDisplay.cpp
Core/HLE/sceDisplay.h
Core/HLE/sceDmac.cpp
Core/HLE/sceDmac.h
2015-03-08 05:27:40 +00:00
Core/HLE/sceG729.cpp
Core/HLE/sceG729.h
2013-03-19 13:28:26 +00:00
Core/HLE/sceGameUpdate.cpp
Core/HLE/sceGameUpdate.h
Core/HLE/sceGe.cpp
Core/HLE/sceGe.h
Core/HLE/sceFont.cpp
Core/HLE/sceFont.h
Core/HLE/sceHeap.cpp
Core/HLE/sceHeap.h
Core/HLE/sceHprm.cpp
Core/HLE/sceHprm.h
Core/HLE/sceHttp.cpp
Core/HLE/sceHttp.h
Core/HLE/sceImpose.cpp
Core/HLE/sceImpose.h
Core/HLE/sceIo.cpp
Core/HLE/sceIo.h
2013-05-15 11:49:34 +00:00
Core/HLE/sceJpeg.cpp
Core/HLE/sceJpeg.h
Core/HLE/sceKernel.cpp
Core/HLE/sceKernel.h
Core/HLE/sceKernelAlarm.cpp
Core/HLE/sceKernelAlarm.h
Core/HLE/sceKernelEventFlag.cpp
Core/HLE/sceKernelEventFlag.h
Core/HLE/sceKernelHeap.cpp
Core/HLE/sceKernelHeap.h
Core/HLE/sceKernelInterrupt.cpp
Core/HLE/sceKernelInterrupt.h
Core/HLE/sceKernelMbx.cpp
Core/HLE/sceKernelMbx.h
Core/HLE/sceKernelMemory.cpp
Core/HLE/sceKernelMemory.h
Core/HLE/sceKernelModule.cpp
Core/HLE/sceKernelModule.h
Core/HLE/sceKernelMsgPipe.cpp
Core/HLE/sceKernelMsgPipe.h
Core/HLE/sceKernelMutex.cpp
Core/HLE/sceKernelMutex.h
Core/HLE/sceKernelSemaphore.cpp
Core/HLE/sceKernelSemaphore.h
Core/HLE/sceKernelThread.cpp
Core/HLE/sceKernelThread.h
Core/HLE/sceKernelTime.cpp
Core/HLE/sceKernelTime.h
Core/HLE/sceKernelVTimer.cpp
Core/HLE/sceKernelVTimer.h
Core/HLE/sceMpeg.cpp
Core/HLE/sceMpeg.h
Core/HLE/sceNet.cpp
Core/HLE/sceNet.h
Core/HLE/sceNetAdhoc.cpp
Core/HLE/sceNetAdhoc.h
Core/HLE/proAdhoc.h
Core/HLE/proAdhoc.cpp
2014-08-04 13:15:58 +00:00
Core/HLE/proAdhocServer.h
Core/HLE/proAdhocServer.cpp
2012-12-06 18:44:29 +00:00
Core/HLE/sceOpenPSID.cpp
Core/HLE/sceOpenPSID.h
2013-03-15 14:45:00 +00:00
Core/HLE/sceP3da.cpp
Core/HLE/sceP3da.h
2014-01-25 04:19:48 +00:00
Core/HLE/sceMt19937.cpp
Core/HLE/sceMt19937.h
2013-05-15 11:49:34 +00:00
Core/HLE/sceMd5.cpp
Core/HLE/sceMd5.h
2013-04-28 00:27:48 +00:00
Core/HLE/sceMp4.cpp
Core/HLE/sceMp4.h
2013-05-06 13:09:40 +00:00
Core/HLE/sceMp3.cpp
Core/HLE/sceMp3.h
2012-12-06 18:44:29 +00:00
Core/HLE/sceParseHttp.cpp
Core/HLE/sceParseHttp.h
Core/HLE/sceParseUri.cpp
Core/HLE/sceParseUri.h
Core/HLE/scePower.cpp
Core/HLE/scePower.h
Core/HLE/scePsmf.cpp
Core/HLE/scePsmf.h
Core/HLE/sceRtc.cpp
Core/HLE/sceRtc.h
Core/HLE/sceSas.cpp
Core/HLE/sceSas.h
2015-02-15 05:22:20 +00:00
Core/HLE/sceSfmt19937.cpp
Core/HLE/sceSfmt19937.h
Core/HLE/sceSha256.cpp
Core/HLE/sceSha256.h
2012-12-06 18:44:29 +00:00
Core/HLE/sceSsl.cpp
Core/HLE/sceSsl.h
Core/HLE/sceUmd.cpp
Core/HLE/sceUmd.h
2012-12-17 20:45:32 +00:00
Core/HLE/sceUsb.cpp
Core/HLE/sceUsb.h
Core/HLE/sceUsbAcc.cpp
Core/HLE/sceUsbAcc.h
Core/HLE/sceUsbCam.cpp
Core/HLE/sceUsbCam.h
2014-08-12 16:11:26 +00:00
Core/HLE/sceUsbGps.cpp
Core/HLE/sceUsbGps.h
2019-08-03 15:33:43 +00:00
Core/HLE/sceUsbMic.cpp
Core/HLE/sceUsbMic.h
Core/HLE/sceUtility.cpp
Core/HLE/sceUtility.h
2012-12-06 18:44:29 +00:00
Core/HLE/sceVaudio.cpp
Core/HLE/sceVaudio.h
2013-02-24 17:27:37 +00:00
Core/HLE/scePspNpDrm_user.cpp
Core/HLE/scePspNpDrm_user.h
Core/HLE/sceNp.cpp
Core/HLE/sceNp.h
Core/HLE/sceNp2.cpp
Core/HLE/sceNp2.h
Core/HLE/scePauth.cpp
Core/HLE/scePauth.h
Core/HW/SimpleAudioDec.cpp
Core/HW/SimpleAudioDec.h
Core/HW/AsyncIOManager.cpp
Core/HW/AsyncIOManager.h
Core/HW/BufferQueue.cpp
Core/HW/BufferQueue.h
2020-01-09 13:57:09 +00:00
Core/HW/Camera.cpp
Core/HW/Camera.h
Core/HW/Display.cpp
Core/HW/Display.h
2013-01-05 15:23:21 +00:00
Core/HW/MediaEngine.cpp
Core/HW/MediaEngine.h
2013-06-01 21:37:51 +00:00
Core/HW/MpegDemux.cpp
Core/HW/MpegDemux.h
Core/HW/MemoryStick.cpp
Core/HW/MemoryStick.h
2012-12-16 19:40:49 +00:00
Core/HW/SasAudio.cpp
Core/HW/SasAudio.h
Core/HW/SasReverb.cpp
Core/HW/SasReverb.h
Core/HW/StereoResampler.cpp
Core/HW/StereoResampler.h
Core/Loaders.cpp
Core/Loaders.h
Core/FileLoaders/CachingFileLoader.cpp
Core/FileLoaders/CachingFileLoader.h
Core/FileLoaders/DiskCachingFileLoader.cpp
Core/FileLoaders/DiskCachingFileLoader.h
Core/FileLoaders/HTTPFileLoader.cpp
Core/FileLoaders/HTTPFileLoader.h
Core/FileLoaders/LocalFileLoader.cpp
Core/FileLoaders/LocalFileLoader.h
Core/FileLoaders/RamCachingFileLoader.cpp
Core/FileLoaders/RamCachingFileLoader.h
Core/FileLoaders/RetryingFileLoader.cpp
Core/FileLoaders/RetryingFileLoader.h
Core/MIPS/MIPS.cpp
Core/MIPS/MIPS.h
Core/MIPS/MIPSAnalyst.cpp
Core/MIPS/MIPSAnalyst.h
Core/MIPS/MIPSCodeUtils.cpp
Core/MIPS/MIPSCodeUtils.h
Core/MIPS/MIPSDebugInterface.cpp
Core/MIPS/MIPSDebugInterface.h
Core/MIPS/MIPSDis.cpp
Core/MIPS/MIPSDis.h
Core/MIPS/MIPSDisVFPU.cpp
Core/MIPS/MIPSDisVFPU.h
Core/MIPS/MIPSInt.cpp
Core/MIPS/MIPSInt.h
Core/MIPS/MIPSIntVFPU.cpp
Core/MIPS/MIPSIntVFPU.h
Core/MIPS/MIPSStackWalk.cpp
Core/MIPS/MIPSStackWalk.h
Core/MIPS/MIPSTables.cpp
Core/MIPS/MIPSTables.h
Core/MIPS/MIPSVFPUUtils.cpp
Core/MIPS/MIPSVFPUUtils.h
Core/MIPS/MIPSVFPUFallbacks.cpp
Core/MIPS/MIPSVFPUFallbacks.h
2013-07-28 12:50:25 +00:00
Core/MIPS/MIPSAsm.cpp
Core/MIPS/MIPSAsm.h
Core/MemFault.cpp
Core/MemFault.h
Core/MemMap.cpp
Core/MemMap.h
Core/MemMapFunctions.cpp
Core/MemMapHelpers.h
Core/PSPLoaders.cpp
Core/PSPLoaders.h
Core/Reporting.cpp
Core/Reporting.h
Core/Replay.cpp
Core/Replay.h
Core/SaveState.cpp
Core/SaveState.h
2014-12-21 07:14:46 +00:00
Core/Screenshot.cpp
Core/Screenshot.h
Core/System.cpp
Core/System.h
Core/ThreadPools.cpp
Core/ThreadPools.h
2015-01-11 21:50:52 +00:00
Core/Util/AudioFormat.cpp
Core/Util/AudioFormat.h
Core/Util/GameManager.cpp
Core/Util/GameManager.h
2020-01-17 19:32:09 +00:00
Core/Util/PortManager.cpp
Core/Util/PortManager.h
Core/Util/BlockAllocator.cpp
Core/Util/BlockAllocator.h
Core/Util/PPGeDraw.cpp
Core/Util/PPGeDraw.h
2016-10-12 14:46:29 +00:00
${GPU_SOURCES}
2016-10-12 15:30:18 +00:00
ext/disarm.cpp
ext/disarm.h
ext/riscv-disas.cpp
ext/riscv-disas.h
${CMAKE_CURRENT_BINARY_DIR}/git-version.cpp
)
if(ANDROID)
set(CoreExtraLibs ${CoreExtraLibs} android)
if(X86_64)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
endif()
endif()
2022-12-17 18:08:46 +00:00
if(USE_ARMIPS)
set(CoreExtraLibs ${CoreExtraLibs} armips)
else()
add_definitions(-DNO_ARMIPS=1)
endif()
2017-12-15 15:03:48 +00:00
# needed for VK_USE_PLATFORM_XCB_KHR only
#if(VULKAN AND NOT WIN32)
# target_link_libraries(native X11-xcb X11)
#endif()
set(GlslangLibs glslang OGLCompiler OSDependent SPIRV spirv-cross-glsl)
if (ENABLE_SPVREMAPPER)
list(APPEND GlslangLibs SPVRemapper)
endif()
2017-02-16 16:06:03 +00:00
2018-03-23 02:18:13 +00:00
if(WIN32)
set(GlslangLibs ${GlslangLibs} spirv-cross-hlsl)
2018-03-23 02:18:13 +00:00
endif()
if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND AND NOT APPLE)
2021-10-28 08:30:05 +00:00
set(OPENGL_LIBRARIES OpenGL::OpenGL)
endif()
if(USE_SYSTEM_ZSTD)
find_package(ZSTD REQUIRED)
target_include_directories(${CoreLibName} PRIVATE ${ZSTD_INCLUDE_DIR})
target_link_libraries(${CoreLibName} ${ZSTD_LIBRARY})
else()
set(ZSTD_BUILD_PROGRAMS OFF CACHE BOOL "we don't need zstd programs" FORCE)
set(ZSTD_LEGACY_SUPPORT OFF CACHE BOOL "we don't use any old zstd files" FORCE)
2021-10-28 08:30:05 +00:00
add_subdirectory(ext/zstd/build/cmake EXCLUDE_FROM_ALL)
set(CoreExtraLibs ${CoreExtraLibs} libzstd_static)
include_directories(ext/zstd/lib)
2021-02-20 09:19:15 +00:00
endif()
2017-02-16 16:06:03 +00:00
target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash ${GlslangLibs}
${CoreExtraLibs} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} ${CMAKE_DL_LIBS})
2022-01-17 19:13:24 +00:00
target_compile_features(${CoreLibName} PUBLIC cxx_std_17)
if(FFmpeg_FOUND)
target_compile_definitions(${CoreLibName} PRIVATE USE_FFMPEG=1)
set_target_properties(${CoreLibName} PROPERTIES NO_SYSTEM_FROM_IMPORTED true)
target_include_directories(${CoreLibName} BEFORE PUBLIC ${FFmpeg_INCLUDE_avcodec})
target_link_libraries(${CoreLibName}
FFmpeg::avcodec
FFmpeg::avformat
FFmpeg::avutil
FFmpeg::swresample
FFmpeg::swscale
${ZLIB_LIBRARY}
)
endif()
# Discord integration
if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO)
2018-11-10 15:39:27 +00:00
add_definitions(-DUSE_DISCORD=1)
target_link_libraries(${CoreLibName} discord-rpc)
endif()
2020-01-17 19:32:09 +00:00
# miniUPnPc integration (MiniUPnPc supposed to works on any POSIX system, not sure if some of these are redundant/not needed tho)
if(USE_MINIUPNPC)
if(USE_SYSTEM_MINIUPNPC)
find_package(MINIUPNPC REQUIRED)
target_include_directories(${CoreLibName} PRIVATE ${MINIUPNP_INCLUDE_DIR})
target_link_libraries(${CoreLibName} ${MINIUPNP_LIBRARY})
add_definitions(-DWITH_UPNP -DUSE_SYSTEM_MINIUPNPC)
2020-01-17 19:32:09 +00:00
else()
set (MINIUPNPC_VERSION 2.1) # used by miniupnpcstrings.h.cmake
set (MINIUPNPC_API_VERSION 17)
option(UPNPC_BUILD_STATIC "Build static library" TRUE)
option(NO_GETADDRINFO "Define NO_GETADDRINFO" FALSE)
mark_as_advanced(NO_GETADDRINFO)
if (NO_GETADDRINFO)
add_definitions(-DNO_GETADDRINFO)
endif()
if (NOT WIN32)
add_definitions (-DMINIUPNPC_SET_SOCKET_TIMEOUT)
add_definitions (-D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L)
endif()
if (MACOSX)
add_definitions (-D_DARWIN_C_SOURCE)
endif()
if(WIN32)
add_definitions(-DWIN32 -DMINIUPNP_EXPORTS)
else()
add_definitions(-fPIC)
endif()
add_definitions(-DWITH_UPNP -DMINIUPNP_STATICLIB)
set(MINIUPNP_DIR "ext/miniupnp/miniupnpc")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
configure_file(${MINIUPNP_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h) # by default miniupnp repo doesn't contains miniupnpcstrings.h and need to be generated
set(MINIUPNPC_SOURCES
# the needed bits of miniupnpc (no python module, no tests, no cli)
${MINIUPNP_DIR}/addr_is_reserved.c
${MINIUPNP_DIR}/connecthostport.c
${MINIUPNP_DIR}/igd_desc_parse.c
${MINIUPNP_DIR}/minisoap.c
${MINIUPNP_DIR}/minissdpc.c
${MINIUPNP_DIR}/miniupnpc.c
${MINIUPNP_DIR}/miniwget.c
${MINIUPNP_DIR}/minixml.c
${MINIUPNP_DIR}/minixmlvalid.c
${MINIUPNP_DIR}/portlistingparse.c
${MINIUPNP_DIR}/receivedata.c
#${MINIUPNP_DIR}/upnpc.c # causing an error due to already existing _main()
${MINIUPNP_DIR}/upnpcommands.c
${MINIUPNP_DIR}/upnpdev.c
${MINIUPNP_DIR}/upnperrors.c
${MINIUPNP_DIR}/upnpreplyparse.c
${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h
)
if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
#set(MINIUPNPC_SOURCES ${MINIUPNPC_SOURCES} minissdpc.c) # causing an error due to duplication in MINIUPNPC_SOURCES?
endif()
if (WIN32)
set_source_files_properties(${MINIUPNPC_SOURCES} PROPERTIES COMPILE_DEFINITIONS "MINIUPNP_STATICLIB;MINIUPNP_EXPORTS")
set(LDLIBS ws2_32 iphlpapi ${LDLIBS})
#elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris")
# find_library (SOCKET_LIBRARY NAMES socket)
# find_library (NSL_LIBRARY NAMES nsl)
# find_library (RESOLV_LIBRARY NAMES resolv)
# set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
endif()
if (UPNPC_BUILD_STATIC)
add_library(miniupnpc STATIC ${MINIUPNPC_SOURCES})
target_link_libraries(${CoreLibName} miniupnpc ${LDLIBS})
set(UPNPC_LIBRARY miniupnpc)
if (MSVC)
# Suppress noise warnings
target_compile_definitions(miniupnpc PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS)
endif()
endif()
2020-01-17 19:32:09 +00:00
endif()
endif()
setup_target_project(${CoreLibName} Core)
# Generate git-version at build time.
add_custom_target(GitVersion DEPENDS something_that_never_exists)
set(WIN_VERSION_CMD "")
if (WIN32)
set(WIN_VERSION_CMD COMMAND ${CMAKE_SOURCE_DIR}/Windows/git-version-gen.cmd PPSSPPWindows)
endif()
2013-03-02 19:01:08 +00:00
add_custom_command(OUTPUT something_that_never_exists
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
-DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake
${WIN_VERSION_CMD})
2013-03-02 19:01:08 +00:00
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/git-version.cpp
PROPERTIES GENERATED TRUE
SKIP_AUTOMOC ON)
2013-03-02 19:01:08 +00:00
add_dependencies(${CoreLibName} GitVersion)
set(WindowsFiles
Windows/DSoundStream.cpp
Windows/DSoundStream.h
Windows/WindowsAudio.cpp
Windows/WindowsAudio.h
Windows/WASAPIStream.cpp
Windows/WASAPIStream.h
Windows/Debugger/BreakpointWindow.cpp
Windows/Debugger/BreakpointWindow.h
Windows/Debugger/DumpMemoryWindow.cpp
Windows/Debugger/DumpMemoryWindow.h
Windows/Debugger/CtrlDisAsmView.cpp
Windows/Debugger/CtrlDisAsmView.h
Windows/Debugger/CtrlMemView.cpp
Windows/Debugger/CtrlMemView.h
Windows/Debugger/CtrlRegisterList.cpp
Windows/Debugger/CtrlRegisterList.h
Windows/Debugger/DebuggerShared.cpp
Windows/Debugger/DebuggerShared.h
Windows/Debugger/Debugger_Disasm.cpp
Windows/Debugger/Debugger_Disasm.h
Windows/Debugger/Debugger_MemoryDlg.cpp
Windows/Debugger/Debugger_MemoryDlg.h
Windows/Debugger/Debugger_Lists.cpp
Windows/Debugger/Debugger_Lists.h
Windows/Debugger/Debugger_SymbolMap.h
Windows/Debugger/Debugger_VFPUDlg.cpp
Windows/Debugger/Debugger_VFPUDlg.h
Windows/Debugger/WatchItemWindow.cpp
Windows/Debugger/WatchItemWindow.h
Windows/GEDebugger/CtrlDisplayListView.cpp
Windows/GEDebugger/SimpleGLWindow.cpp
Windows/GEDebugger/TabState.cpp
Windows/GEDebugger/VertexPreview.cpp
Windows/GEDebugger/CtrlDisplayListView.h
Windows/GEDebugger/SimpleGLWindow.h
Windows/GEDebugger/TabState.h
Windows/GEDebugger/GEDebugger.cpp
Windows/GEDebugger/TabDisplayLists.cpp
Windows/GEDebugger/TabVertices.cpp
Windows/GEDebugger/GEDebugger.h
Windows/GEDebugger/TabDisplayLists.h
Windows/GEDebugger/TabVertices.h
2020-01-13 07:06:02 +00:00
Windows/BufferLock.h
Windows/CaptureDevice.cpp
Windows/CaptureDevice.h
Windows/DinputDevice.cpp
Windows/DinputDevice.h
Windows/DSoundStream.cpp
Windows/DSoundStream.h
Windows/EmuThread.cpp
Windows/EmuThread.h
Windows/GeDebugger/GeDebugger.cpp
Windows/GPU/D3D9Context.cpp
Windows/GPU/D3D9Context.h
2017-02-16 16:06:03 +00:00
Windows/GPU/D3D11Context.cpp
Windows/GPU/D3D11Context.h
Windows/GPU/WindowsGLContext.cpp
Windows/GPU/WindowsVulkanContext.cpp
Windows/InputBox.cpp
Windows/InputBox.h
Windows/InputDevice.cpp
Windows/InputDevice.h
Windows/W32Util/ContextMenu.h
Windows/W32Util/ContextMenu.h
Windows/W32Util/DialogManager.cpp
Windows/W32Util/DialogManager.h
Windows/W32Util/Misc.cpp
Windows/W32Util/Misc.h
Windows/W32Util/ShellUtil.cpp
Windows/W32Util/ShellUtil.h
Windows/W32Util/TabControl.cpp
Windows/W32Util/TabControl.h
Windows/WindowsHost.cpp
Windows/WindowsHost.h
Windows/MainWindow.cpp
Windows/MainWindow.h
Windows/MainWindowMenu.cpp
Windows/MainWindowMenu.h
Windows/RawInput.cpp
Windows/RawInput.h
Windows/TouchInputHandler.cpp
Windows/TouchInputHandler.h
Windows/XinputDevice.cpp
Windows/XinputDevice.h
Windows/main.cpp
Windows/main.h
Windows/ppsspp.rc
Windows/resource.h
Windows/stdafx.cpp
Windows/stdafx.h
)
list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT})
if(WIN32)
2020-01-13 07:06:02 +00:00
list(APPEND LinkCommon kernel32 user32 gdi32 shell32 comctl32 dsound xinput d3d9 winmm dinput8 ole32 winspool ksuser mf mfplat mfreadwrite mfuuid shlwapi)
#setup_target_project(${TargetBin} Windows)
list(APPEND NativeAppSource ${WindowsFiles})
endif()
set(BigFontAssets
assets/font_atlas.zim
assets/font_atlas.meta
)
2012-12-16 15:47:39 +00:00
set(NativeAssets
assets/ui_atlas.zim
assets/ui_atlas.meta
assets/asciifont_atlas.zim
assets/asciifont_atlas.meta
assets/debugger
2016-10-14 20:46:01 +00:00
assets/lang
assets/shaders
2022-02-14 06:37:56 +00:00
assets/themes
2023-03-10 10:22:09 +00:00
assets/vfpu
2017-06-07 06:25:42 +00:00
assets/Roboto-Condensed.ttf
assets/7z.png
assets/compat.ini
assets/gamecontrollerdb.txt
2017-06-07 06:25:42 +00:00
assets/langregion.ini
assets/ppge_atlas.zim
assets/ppge_atlas.meta
2017-06-07 06:25:42 +00:00
assets/rargray.png
assets/unknown.png
assets/zip.png
2020-08-04 21:36:35 +00:00
assets/sfx_back.wav
assets/sfx_confirm.wav
assets/sfx_select.wav
assets/sfx_toggle_off.wav
assets/sfx_toggle_on.wav
source_assets/image/logo.png
source_assets/image/icon_regular_72.png
)
2013-10-20 00:35:46 +00:00
if(HEADLESS)
set(HeadlessSource
2013-10-20 00:35:46 +00:00
headless/Headless.cpp
headless/HeadlessHost.cpp
headless/HeadlessHost.h
2013-10-20 00:35:46 +00:00
headless/Compare.cpp
2017-06-18 19:15:59 +00:00
headless/Compare.h
headless/SDLHeadlessHost.cpp
headless/SDLHeadlessHost.h
)
if(WIN32)
list(APPEND HeadlessSource
headless/WindowsHeadlessHost.cpp
headless/WindowsHeadlessHost.h
Windows/GPU/D3D9Context.cpp
Windows/GPU/D3D9Context.h
Windows/GPU/D3D11Context.cpp
Windows/GPU/D3D11Context.h
Windows/GPU/WindowsGLContext.cpp
Windows/GPU/WindowsVulkanContext.cpp
Windows/W32Util/ShellUtil.cpp
Windows/W32Util/ShellUtil.h
Windows/CaptureDevice.cpp
Windows/CaptureDevice.h
Windows/W32Util/Misc.cpp
Windows/W32Util/Misc.h
)
endif()
add_executable(PPSSPPHeadless ${HeadlessSource})
target_link_libraries(PPSSPPHeadless ${COCOA_LIBRARY} ${QUARTZ_CORE_LIBRARY} ${IOKIT_LIBRARY} ${LinkCommon})
2013-10-20 00:35:46 +00:00
setup_target_project(PPSSPPHeadless headless)
endif()
2014-01-09 11:09:07 +00:00
if(UNITTEST)
add_executable(PPSSPPUnitTest
2014-01-09 11:09:07 +00:00
unittest/UnitTest.cpp
unittest/TestShaderGenerators.cpp
2015-04-03 21:50:51 +00:00
unittest/TestArmEmitter.cpp
unittest/TestArm64Emitter.cpp
2022-07-24 17:37:54 +00:00
unittest/TestIRPassSimplify.cpp
2015-04-03 21:50:51 +00:00
unittest/TestX64Emitter.cpp
2015-07-03 22:25:40 +00:00
unittest/TestVertexJit.cpp
unittest/TestVFS.cpp
unittest/TestRiscVEmitter.cpp
unittest/TestSoftwareGPUJit.cpp
2021-06-12 20:42:10 +00:00
unittest/TestThreadManager.cpp
2015-04-03 21:50:51 +00:00
unittest/JitHarness.cpp
Core/MIPS/ARM/ArmRegCache.cpp
Core/MIPS/ARM/ArmRegCacheFPU.cpp
2014-01-09 11:09:07 +00:00
)
target_link_libraries(PPSSPPUnitTest ${COCOA_LIBRARY} ${QUARTZ_CORE_LIBRARY} ${IOKIT_LIBRARY} ${LinkCommon} Common)
setup_target_project(PPSSPPUnitTest unittest)
add_test(arm64_emitter PPSSPPUnitTest Arm64Emitter)
add_test(arm_emitter PPSSPPUnitTest ArmEmitter)
add_test(x64_emitter PPSSPPUnitTest X64Emitter)
add_test(vertex_jit PPSSPPUnitTest VertexJit)
add_test(asin PPSSPPUnitTest Asin)
add_test(sincos PPSSPPUnitTest SinCos)
add_test(vfpu_sincos PPSSPPUnitTest VFPUSinCos)
add_test(math_util PPSSPPUnitTest MathUtil)
add_test(parsers PPSSPPUnitTest Parsers)
add_test(jit PPSSPPUnitTest Jit)
add_test(matrix_transpose PPSSPPUnitTest MatrixTranspose)
add_test(parse_lbn PPSSPPUnitTest ParseLBN)
add_test(quick_texhash PPSSPPUnitTest QuickTexHash)
add_test(clz PPSSPPUnitTest CLZ)
add_test(shadergen PPSSPPUnitTest ShaderGenerators)
2014-01-09 11:09:07 +00:00
endif()
2018-03-24 11:44:53 +00:00
if(LIBRETRO)
add_subdirectory(libretro)
endif()
if(TargetBin)
2020-12-08 05:46:14 +00:00
if(APPLE)
if(NOT IOS)
if(GOLD)
set(ICON_PATH_ABS ${CMAKE_CURRENT_SOURCE_DIR}/icons/ppsspp_gold.icns)
set(MACOSX_BUNDLE_ICON_FILE ppsspp_gold.icns)
set(MACOSX_BUNDLE_BUNDLE_NAME "PPSSPP Gold")
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.ppsspp.ppssppgold)
else()
set(ICON_PATH_ABS ${CMAKE_CURRENT_SOURCE_DIR}/icons/ppsspp.icns)
set(MACOSX_BUNDLE_ICON_FILE ppsspp.icns)
set(MACOSX_BUNDLE_BUNDLE_NAME "PPSSPP")
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.ppsspp.ppsspp)
endif()
set_source_files_properties(${ICON_PATH_ABS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
endif()
# TODO: there must a native way to copy these.
# Now this is very prone to errors when changes occur.
# Also better to have assets under Resources dir for OS X.
file(GLOB_RECURSE FLASH0_FILES assets/flash0/*)
2016-10-14 20:33:45 +00:00
file(GLOB_RECURSE LANG_FILES assets/lang/*)
file(GLOB_RECURSE SHADER_FILES assets/shaders/*)
2022-02-14 06:37:56 +00:00
file(GLOB_RECURSE THEME_FILE assets/themes/*)
file(GLOB_RECURSE DEBUGGER_FILES assets/debugger/*)
file(GLOB_RECURSE VFPU_FILES assets/vfpu/*)
2020-12-08 05:46:14 +00:00
if(NOT IOS)
set_source_files_properties(${BigFontAssets} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets")
set_source_files_properties(${NativeAssets} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets")
set_source_files_properties(${FLASH0_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets/flash0/font")
set_source_files_properties(${LANG_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets/lang")
set_source_files_properties(${SHADER_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets/shaders")
2022-02-14 06:37:56 +00:00
set_source_files_properties(${THEME_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets/themes")
set_source_files_properties(${DEBUGGER_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets/debugger")
set_source_files_properties(${VFPU_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/assets/vfpu")
endif()
if(IOS)
2022-02-14 06:37:56 +00:00
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${BigFontAssets} ${SHADER_FILES} ${THEME_FILE} ${DEBUGGER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource} "ios/Settings.bundle" "ios/Launch Screen.storyboard")
2021-11-06 06:55:44 +00:00
file(INSTALL "${CMAKE_SOURCE_DIR}/ext/vulkan/iOS/Frameworks/libMoltenVK.dylib" DESTINATION "${CMAKE_BINARY_DIR}/PPSSPP.app/Frameworks/")
2018-01-04 17:56:49 +00:00
else()
2022-02-14 06:37:56 +00:00
add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${BigFontAssets} ${SHADER_FILES} ${THEME_FILE} ${DEBUGGER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource})
file(INSTALL "${CMAKE_SOURCE_DIR}/ext/vulkan/macOS/Frameworks/libMoltenVK.dylib" DESTINATION "${CMAKE_BINARY_DIR}/${TargetBin}.app/Contents/Frameworks/")
if(USING_QT_UI)
2020-02-04 03:55:54 +00:00
add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/Qt/macbundle.sh" "${CMAKE_BINARY_DIR}/PPSSPPQt.app")
2023-05-05 21:17:45 +00:00
elseif(NOT USE_SYSTEM_LIBSDL2)
add_custom_command(TARGET ${TargetBin} POST_BUILD COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/SDL/macbundle.sh" "${CMAKE_BINARY_DIR}/${TargetBin}.app" "${TargetBin}")
endif()
2018-01-04 17:56:49 +00:00
endif()
2016-12-05 16:34:26 +00:00
elseif(WIN32)
2017-02-16 16:06:03 +00:00
add_executable(${TargetBin} WIN32 ${NativeAppSource})
2018-03-23 02:18:13 +00:00
if(MSVC)
set_target_properties(${TargetBin} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
else()
set_target_properties(${TargetBin} PROPERTIES LINK_FLAGS "-Wl,-subsystem,windows")
endif()
2016-12-05 16:34:26 +00:00
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${TargetBin})
else()
add_executable(${TargetBin} ${NativeAppSource})
endif()
2015-04-03 21:50:51 +00:00
target_link_libraries(${TargetBin} ${LinkCommon} Common)
endif()
# installs
if(NOT ANDROID)
file(INSTALL ${BigFontAssets} DESTINATION assets)
file(INSTALL ${NativeAssets} DESTINATION assets)
file(INSTALL assets/flash0 DESTINATION assets)
endif()
2013-03-24 06:18:00 +00:00
# packaging and code signing
2023-02-07 04:36:55 +00:00
if(IOS AND NOT LIBRETRO)
set(DEPLOYMENT_TARGET 11.0)
file(GLOB IOSAssets ios/assets/*.png)
list(REMOVE_ITEM IOSAssets ${CMAKE_CURRENT_SOURCE_DIR}/ios/assets/Default-568h@2x.png)
list(REMOVE_ITEM IOSAssets ${CMAKE_CURRENT_SOURCE_DIR}/ios/assets/Default-568h@3x.png)
2016-10-11 01:27:54 +00:00
file(INSTALL ${IOSAssets} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/assets)
file(GLOB IOSAssets ios/assets/Default-568h@*.png)
2016-10-11 01:27:54 +00:00
file(INSTALL ${IOSAssets} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
if(IOS_DEBUG)
2016-10-11 01:27:54 +00:00
file(INSTALL pspautotests DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/assets)
endif()
set(RSRC_XIB_FILES assets/Icon@2x.png)
2018-01-04 17:56:49 +00:00
set(RSRC_XIB_FILES "Launch Screen.storyboard")
set_source_files_properties(${RSRC_XIB_FILES}
PROPERTIES MACOSX_PACKAGE_LOCATION Resources
)
#This breaks in modern XCode. Not sure when it worked...
#if(CMAKE_GENERATOR STREQUAL "Xcode")
# set(APP_DIR_NAME "$(TARGET_BUILD_DIR)/$(FULL_PRODUCT_NAME)")
#else()
set(APP_DIR_NAME "$<TARGET_FILE_DIR:PPSSPP>")
#endif()
add_custom_command(TARGET PPSSPP POST_BUILD
COMMAND mkdir -p \"${APP_DIR_NAME}\"
COMMAND tar -c -C ${CMAKE_CURRENT_BINARY_DIR} --exclude .DS_Store --exclude .git assets *.png | tar -x -C \"${APP_DIR_NAME}\"
2020-04-30 17:06:03 +00:00
COMMAND /bin/bash "${CMAKE_SOURCE_DIR}/ios/macbundle.sh" \"${APP_DIR_NAME}\"
)
2018-01-04 17:56:49 +00:00
set(MACOSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET})
set_target_properties(${TargetBin} PROPERTIES
2016-10-12 11:24:53 +00:00
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/ios/PPSSPP-Info.plist"
2018-01-04 17:56:49 +00:00
RESOURCE "ios/Launch Screen.storyboard"
RESOURCE "ios/Settings.bundle"
RESOURCE "ext/vulkan/iOS/Frameworks"
2018-01-04 17:56:49 +00:00
XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET}
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "iPhone/iPad"
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES
XCODE_ATTRIBUTE_ENABLE_BITCODE NO
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "-"
)
endif()
2020-12-06 01:49:21 +00:00
2023-04-26 11:25:48 +00:00
if(MACOSX AND NOT IOS)
if(GOLD)
set_target_properties(${TargetBin} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macOS/InfoGold.plist"
)
else()
set_target_properties(${TargetBin} PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macOS/Info.plist"
)
endif()
endif()
if(UNIX AND NOT ANDROID AND NOT APPLE)
2020-12-07 08:12:55 +00:00
configure_file(
"${CMAKE_SOURCE_DIR}/ppsspp.desktop.in"
"${CMAKE_BINARY_DIR}/ppsspp.desktop"
@ONLY
)
install(
TARGETS ${TargetBin}
DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
install(
DIRECTORY "${CMAKE_BINARY_DIR}/assets"
DESTINATION "${CMAKE_INSTALL_DATADIR}/ppsspp"
PATTERN ".git*" EXCLUDE
PATTERN "mime" EXCLUDE
PATTERN "lang/README.md" EXCLUDE
2020-12-07 08:12:55 +00:00
)
install(
FILES "${CMAKE_BINARY_DIR}/ppsspp.desktop"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
RENAME ${TargetBin}.desktop
)
install(
DIRECTORY "${CMAKE_SOURCE_DIR}/icons/hicolor"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons"
)
install(
FILES "${CMAKE_SOURCE_DIR}/icons/icon-512.svg"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps"
RENAME "ppsspp.svg"
)
install(
FILES "${CMAKE_SOURCE_DIR}/assets/mime/ppsspp.xml"
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages"
2020-12-07 08:12:55 +00:00
)
endif()