2 cmake_minimum_required(VERSION 2.8.8)
5 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests)
7 add_definitions(-DPPSSPP)
9 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
11 add_definitions(-D_ARCH_64=1)
14 add_definitions(-D_ARCH_32=1)
17 # Detect CPU from CMAKE configuration. Toolchains should set this up
18 if(CMAKE_SYSTEM_PROCESSOR)
19 if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
21 if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv7")
24 elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR
25 ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^amd64" OR
26 ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
28 elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^mips")
40 if(EXISTS "/opt/vc/include/bcm_host.h")
41 message(STATUS "RaspberryPI VC Found")
51 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
53 add_definitions(-D__STDC_CONSTANT_MACROS)
56 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
62 add_definitions(-D_M_X64)
64 add_definitions(-D_M_IX86)
68 if(NOT DEFINED HEADLESS)
72 # Doesn't link on some platforms
73 #if(NOT DEFINED UNITTEST)
77 # User-editable options (go into CMakeCache.txt)
79 option(ARMV7 "Set to ON if targeting an ARMv7 processor" ${ARMV7})
80 option(ARM "Set to ON if targeting an ARM processor" ${ARM})
81 option(MIPS "Set to ON if targeting a MIPS processor" ${MIPS})
82 option(X86 "Set to ON if targeting an X86 processor" ${X86})
84 option(ANDROID "Set to ON if targeting an Android device" ${ANDROID})
85 option(BLACKBERRY "Set to ON if targeting a Blackberry device" ${BLACKBERRY})
86 option(IOS "Set to ON if targeting an iOS device" ${IOS})
87 option(MAEMO "Set to ON if targeting a Maemo (N900) device" ${MAEMO})
88 option(BB "Set to ON if targeting a Beaglebone/Beaglebone Black device" ${BB})
90 option(USING_EGL "Set to ON if target environment uses EGL" ${USING_EGL})
91 option(USING_FBDEV "Set to ON if target environment uses fbdev (eg. Pandora)" ${USING_FBDEV})
92 option(USING_GLES2 "Set to ON if target device uses OpenGL ES 2.0" ${USING_GLES2})
94 option(USING_QT_UI "Set to ON if you wish to use the Qt frontend wrapper" ${USING_QT_UI})
95 option(MOBILE_DEVICE "Set to ON when targetting a mobile device" ${MOBILE_DEVICE})
96 option(HEADLESS "Set to OFF to not generate the PPSSPPHeadless target" ${HEADLESS})
97 option(UNITTEST "Set to ON to generate the unittest target" ${UNITTEST})
98 option(SIMULATOR "Set to ON when targeting an x86 simulator of an ARM platform" ${SIMULATOR})
100 option(USE_FFMPEG "Build with FFMPEG support" ${USE_FFMPEG})
101 option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
103 if(ANDROID OR BLACKBERRY OR IOS)
104 if (NOT CMAKE_TOOLCHAIN_FILE)
106 set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/android/android.toolchain.cmake)
108 set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/Blackberry/bb.toolchain.cmake)
110 set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/ios/ios.toolchain.cmake)
112 message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE was not set!\n"
113 "Delete the CMakeCache.txt file and CMakeFiles directory.\n"
114 "Re-run ${CMAKE_COMMAND} with:\n"
115 "\"-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}\"")
117 set(MOBILE_DEVICE ON)
122 set(CoreLibName ppsspp_jni)
123 set(CoreLinkType SHARED)
125 set(CoreLibName Core)
126 set(CoreLinkType STATIC)
129 include_directories(native)
132 include_directories(/opt/vc/include /opt/vc/include/interface/vcos/pthreads)
133 link_directories(/opt/vc/lib)
134 set(OPENGL_LIBRARIES GLESv2 bcm_host)
135 elseif(USING_GLES2 AND NOT IOS)
136 set(OPENGL_LIBRARIES GLESv2)
138 include(FindOpenGL REQUIRED)
142 #Maemo's gcc-4.7.2 is strict
143 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
146 if (NOT BLACKBERRY AND NOT ANDROID AND NOT IOS)
152 find_library(COCOA_LIBRARY Cocoa)
155 # Needed for Globals.h
156 include_directories("${CMAKE_SOURCE_DIR}")
159 add_definitions(-DARM)
162 add_definitions(-DMIPS)
166 add_definitions(-DANDROID)
169 add_definitions(-DBLACKBERRY=${BLACKBERRY})
172 add_definitions(-DIOS)
175 add_definitions(-DMAEMO)
178 add_definitions(-DRPI)
182 add_definitions(-DUSING_EGL)
185 add_definitions(-DUSING_FBDEV)
188 add_definitions(-DUSING_GLES2)
191 add_definitions(-DMOBILE_DEVICE)
194 if (NOT CMAKE_BUILD_TYPE)
195 message(STATUS "No build type selected, default to Release")
196 set(CMAKE_BUILD_TYPE "Release")
200 message("Building for ARMv7, ${CMAKE_BUILD_TYPE}")
202 message("Building for ARMv6, ${CMAKE_BUILD_TYPE}")
204 message("Building for MIPS in x86 mode, ${CMAKE_BUILD_TYPE}")
206 message("Buildings for MIPS, ${CMAKE_BUILD_TYPE}")
208 message("Building for x86, ${CMAKE_BUILD_TYPE}")
210 message("Building for Generic, ${CMAKE_BUILD_TYPE}")
214 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -D_DEBUG")
215 set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
216 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -D_NDEBUG")
217 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")
218 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -D_DEBUG")
219 set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -D_NDEBUG")
220 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -D_NDEBUG")
221 set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O2 -g -D_NDEBUG")
223 # Disable some warnings
224 add_definitions(-Wno-multichar)
225 add_definitions(-fno-strict-aliasing)
226 if (CMAKE_C_COMPILER_ID STREQUAL "Intel")
227 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -parallel -fopenmp")
231 # enable sse2 code generation
232 add_definitions(-msse2)
235 if (BLACKBERRY AND ARM)
236 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
237 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
241 add_definitions(-DGL_ETC1_RGB8_OES=0)
242 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -U__STRICT_ANSI__")
243 set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
244 # armv7s (without resorting to FastMemory) is still a work in progress
245 # comment out the next line to enable default/"standard" architectures (which is a fat armv7/armv7s binary)
246 set(CMAKE_OSX_ARCHITECTURES "armv7")
248 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -U__STRICT_ANSI__")
249 # Karen/angelXwind: --macosx-version-min=10.7 is needed in order to produce binaries that OS X 10.7 Lion can execute. However, it seems that PPSSPP won't support 10.6 or lower without getting rid of -stdlib=libc++ ...which probably won't end well. So I guess PPSSPP will strictly be a 10.7+ app.
250 # vit9696: OSX 10.6 builds are possible: http://forums.ppsspp.org/showthread.php?tid=1826&pid=18875#pid18875
251 set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
253 if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
254 add_definitions(-Wno-psabi)
257 add_definitions(-D_XOPEN_SOURCE=600)
259 add_definitions(-D_XOPEN_SOURCE=700)
261 add_definitions(-D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1)
262 add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64)
264 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
266 # Disable warnings about MS-specific _s variants of libc functions
267 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
268 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
269 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_NDEBUG")
272 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
273 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
276 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/android/libs/${ANDROID_ABI}")
279 # This sets up the MSVC project dirs according to the physical project dirs
280 macro(setup_target_project TargetName ProjectDir)
281 get_property(TargetSources TARGET "${TargetName}" PROPERTY SOURCES)
282 foreach(Source ${TargetSources})
283 # Figure out the file's path relative to the ProjectDir
284 # NOTE: &#$@ double-quoted regexps
285 string(REGEX REPLACE "${ProjectDir}" "" RelativePath "${Source}")
286 string(REGEX REPLACE "[\\\\/][^\\\\/]*$" "" RelativePath "${RelativePath}")
287 string(REGEX REPLACE "^[\\\\/]" "" RelativePath "${RelativePath}")
288 string(REGEX REPLACE "/" "\\\\\\\\" RelativePath "${RelativePath}")
289 # put the source file in a source_group equivalent to the relative path
290 source_group("${RelativePath}" FILES ${Source})
294 # Commented-out files are files that don't compile
295 # and were disabled in the original MSVC project anyway
299 set(CommonExtra ${CommonExtra}
300 Common/ArmCPUDetect.cpp
302 Common/ColorConvNEON.cpp)
304 set(CommonExtra ${CommonExtra}
311 Common/x64Analyzer.cpp
313 Common/x64Emitter.cpp
316 set(CommonExtra ${CommonExtra}
317 Common/MipsCPUDetect.cpp
318 Common/MipsEmitter.cpp
319 Common/MipsEmitter.h)
321 set(CommonExtra ${CommonExtra}
322 Common/FakeCPUDetect.cpp
323 Common/FakeEmitter.h)
327 set(CommonExtra ${CommonExtra}
328 Common/Arm64Emitter.h
329 Common/Arm64Emitter.cpp
331 Common/ArmEmitter.cpp
332 Core/Util/DisArm64.cpp)
334 #Blackberry appears to depend on this being here, should clean it up.
335 set(CommonExtra ${CommonExtra}
337 Common/ArmEmitter.cpp)
341 set(CommonExtra ${CommonExtra}
346 add_library(Common STATIC
352 Common/ConsoleListener.cpp
353 Common/ConsoleListener.h
354 Common/Crypto/md5.cpp
356 Common/Crypto/sha1.cpp
358 Common/Crypto/sha256.cpp
359 Common/Crypto/sha256.h
364 Common/LogManager.cpp
368 Common/MemoryUtil.cpp
371 Common/MsgHandler.cpp
373 Common/StringUtils.cpp
375 Common/ThreadPools.cpp
377 Common/ThreadSafeList.h
380 include_directories(Common)
381 setup_target_project(Common Common)
384 target_link_libraries(Common winmm)
388 include_directories(${OPENGL_INCLUDE_DIR})
390 add_definitions(-DGLEW_STATIC)
391 add_library(glew STATIC
392 native/ext/glew/GL/glew.h
393 native/ext/glew/GL/glxew.h
394 native/ext/glew/GL/wglew.h
395 native/ext/glew/glew.c)
396 target_link_libraries(glew ${OPENGL_LIBRARIES})
397 include_directories(native/ext/glew)
398 set(GLEW_LIBRARIES glew)
401 add_subdirectory(ext/snappy)
402 add_subdirectory(ext/udis86)
404 add_library(vjson STATIC
405 native/ext/vjson/json.cpp
406 native/ext/vjson/json.h
407 native/ext/vjson/block_allocator.cpp
408 native/ext/vjson/block_allocator.h
411 add_library(rg_etc1 STATIC
412 native/ext/rg_etc1/rg_etc1.cpp
413 native/ext/rg_etc1/rg_etc1.h)
414 include_directories(native/ext/rg_etc1)
416 add_library(stb_vorbis STATIC
417 native/ext/stb_vorbis/stb_vorbis.c
418 native/ext/stb_vorbis/stb_vorbis.h)
419 include_directories(native/ext/stb_vorbis)
422 if(USE_SYSTEM_FFMPEG)
425 set(FFMPEG_FOUND OFF)
428 if(NOT DEFINED FFMPEG_BUILDDIR)
431 set(PLATFORM_ARCH "android/armv7")
433 set(PLATFORM_ARCH "android/arm")
435 set(PLATFORM_ARCH "android/x86")
438 set(PLATFORM_ARCH "blackberry/armv7")
440 set(PLATFORM_ARCH "ios/universal")
442 set(PLATFORM_ARCH "macosx/x86_64")
445 set(PLATFORM_ARCH "linux/armv7")
447 set(PLATFORM_ARCH "linux/arm")
449 set(PLATFORM_ARCH "linux/mips32")
450 elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
451 set(PLATFORM_ARCH "linux/x86_64")
453 set(PLATFORM_ARCH "linux/x86")
456 # Using static libraries
457 if (DEFINED PLATFORM_ARCH)
458 include_directories(ffmpeg/${PLATFORM_ARCH}/include)
459 link_directories(ffmpeg/${PLATFORM_ARCH}/lib)
460 set(FFMPEG_LIBRARIES libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a)
462 # Manual definition of system library locations by the user.
463 if (DEFINED FFMPEG_INCLUDE_PATH)
464 include_directories(ffmpeg ${FFMPEG_INCLUDE_PATH})
466 if (DEFINED AVFORMAT_PATH)
467 add_library(libavformat STATIC IMPORTED)
468 set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${AVFORMAT_PATH})
469 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavformat)
471 if (DEFINED AVCODEC_PATH)
472 add_library(libavcodec STATIC IMPORTED)
473 set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${AVCODEC_PATH})
474 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavcodec)
476 if (DEFINED AVUTIL_PATH)
477 add_library(libavutil STATIC IMPORTED)
478 set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${AVUTIL_PATH})
479 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavutil)
481 if (DEFINED SWRESAMPLE_PATH)
482 add_library(libswresample STATIC IMPORTED)
483 set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${SWRESAMPLE_PATH})
484 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswresample)
486 if (DEFINED SWSCALE_PATH)
487 add_library(libswscale STATIC IMPORTED)
488 set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${SWSCALE_PATH})
489 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswscale)
491 endif(DEFINED PLATFORM_ARCH)
492 else(NOT DEFINED FFMPEG_BUILDDIR)
493 # Using shared libraries
494 include_directories(ffmpeg ${FFMPEG_BUILDDIR})
496 add_library(libavformat STATIC IMPORTED)
497 set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavformat/libavformat.a)
498 add_library(libavcodec STATIC IMPORTED)
499 set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavcodec/libavcodec.a)
500 add_library(libavutil STATIC IMPORTED)
501 set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavutil/libavutil.a)
502 add_library(libswresample STATIC IMPORTED)
503 set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswresample/libswresample.a)
504 add_library(libswscale STATIC IMPORTED)
505 set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswscale/libswscale.a)
507 SET (FFMPEG_LIBRARIES
514 endif(NOT DEFINED FFMPEG_BUILDDIR)
515 endif(NOT FFMPEG_FOUND)
517 find_library(ICONV_LIBRARY NAMES iconv)
519 set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${ICONV_LIBRARY})
523 set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} bz2 "-framework CoreVideo")
525 set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} "-framework VideoDecodeAcceleration")
530 set(nativeExtraLibs ${nativeExtraLibs} ${FFMPEG_LIBRARIES})
532 set(LinkCommon ${LinkCommon} ${FFMPEG_LIBRARIES})
534 target_link_libraries(Common ${FFMPEG_LIBRARIES})
535 add_definitions(-DUSE_FFMPEG)
538 # Modification to show where we are pulling the ffmpeg libraries from.
539 if(USE_FFMPEG AND DEFINED FFMPEG_LIBRARIES)
540 message(STATUS "FFMPEG library locations:")
542 message(STATUS "libavcodec location: ${FFMPEG_avcodec_LIBRARY}")
543 message(STATUS "libavformat location: ${FFMPEG_avformat_LIBRARY}")
544 message(STATUS "libavutil location: ${FFMPEG_avutil_LIBRARY}")
545 message(STATUS "libswresample location: ${FFMPEG_swresample_LIBRARY}")
546 message(STATUS "libswscale location: ${FFMPEG_swscale_LIBRARY}")
547 elseif(DEFINED PLATFORM_ARCH)
548 set(TEMP ${CMAKE_SOURCE_DIR}/ffmpeg/${PLATFORM_ARCH}/lib)
549 message(STATUS "libavcodec location: ${TEMP}/libavcodec.a")
550 message(STATUS "libavformat location: ${TEMP}/libavformat.a")
551 message(STATUS "libavutil location: ${TEMP}/libavutil.a")
552 message(STATUS "libswresample location: ${TEMP}/libswresample.a")
553 message(STATUS "libswscale location: ${TEMP}/libswscale.a")
555 get_target_property(TEMP libavcodec IMPORTED_LOCATION)
556 message(STATUS "libavcodec location: ${TEMP}")
557 get_target_property(TEMP libavformat IMPORTED_LOCATION)
558 message(STATUS "libavformat location: ${TEMP}")
559 get_target_property(TEMP libavutil IMPORTED_LOCATION)
560 message(STATUS "libavutil location: ${TEMP}")
561 get_target_property(TEMP libswresample IMPORTED_LOCATION)
562 message(STATUS "libswresample location: ${TEMP}")
563 get_target_property(TEMP libswscale IMPORTED_LOCATION)
564 message(STATUS "libswscale location: ${TEMP}")
567 message(STATUS "ERROR: No FFMPEG library locations")
570 if(USE_FFMPEG AND NOT DEFINED FFMPEG_LIBRARIES)
571 message(WARNING "FFMPEG_BUILDDIR variable or manual path definition is required to enable FFmpeg. Disabling it.")
577 include_directories(${ZLIB_INCLUDE_DIR})
579 add_library(zlib STATIC
599 ext/zlib/make_vms.com
608 include_directories(ext/zlib)
609 set(ZLIB_LIBRARY zlib)
612 add_library(cityhash STATIC
613 native/ext/cityhash/city.cpp
614 native/ext/cityhash/city.h
615 native/ext/cityhash/citycrc.h
617 include_directories(ext/cityhash)
620 # These can be fast even for debug.
621 set_target_properties(snappy PROPERTIES COMPILE_FLAGS "-O3")
622 set_target_properties(udis86 PROPERTIES COMPILE_FLAGS "-O3")
623 set_target_properties(cityhash PROPERTIES COMPILE_FLAGS "-O3")
625 set_target_properties(zlib PROPERTIES COMPILE_FLAGS "-O3")
630 add_library(libzip STATIC
631 native/ext/libzip/zip.h
632 native/ext/libzip/mkstemp.c
633 native/ext/libzip/zip_add.c
634 native/ext/libzip/zip_add_dir.c
635 native/ext/libzip/zip_close.c
636 native/ext/libzip/zip_delete.c
637 native/ext/libzip/zip_dirent.c
638 native/ext/libzip/zip_entry_free.c
639 native/ext/libzip/zip_entry_new.c
640 native/ext/libzip/zip_err_str.c
641 native/ext/libzip/zip_error.c
642 native/ext/libzip/zip_error_clear.c
643 native/ext/libzip/zip_error_get.c
644 native/ext/libzip/zip_error_get_sys_type.c
645 native/ext/libzip/zip_error_strerror.c
646 native/ext/libzip/zip_error_to_str.c
647 native/ext/libzip/zip_fclose.c
648 native/ext/libzip/zip_file_error_clear.c
649 native/ext/libzip/zip_file_error_get.c
650 native/ext/libzip/zip_file_get_offset.c
651 native/ext/libzip/zip_file_strerror.c
652 native/ext/libzip/zip_filerange_crc.c
653 native/ext/libzip/zip_fopen.c
654 native/ext/libzip/zip_fopen_index.c
655 native/ext/libzip/zip_fread.c
656 native/ext/libzip/zip_free.c
657 native/ext/libzip/zip_get_archive_comment.c
658 native/ext/libzip/zip_get_archive_flag.c
659 native/ext/libzip/zip_get_file_comment.c
660 native/ext/libzip/zip_get_name.c
661 native/ext/libzip/zip_get_num_files.c
662 native/ext/libzip/zip_memdup.c
663 native/ext/libzip/zip_name_locate.c
664 native/ext/libzip/zip_new.c
665 native/ext/libzip/zip_open.c
666 native/ext/libzip/zip_rename.c
667 native/ext/libzip/zip_replace.c
668 native/ext/libzip/zip_set_archive_comment.c
669 native/ext/libzip/zip_set_archive_flag.c
670 native/ext/libzip/zip_set_file_comment.c
671 native/ext/libzip/zip_set_name.c
672 native/ext/libzip/zip_source_buffer.c
673 native/ext/libzip/zip_source_file.c
674 native/ext/libzip/zip_source_filep.c
675 native/ext/libzip/zip_source_free.c
676 native/ext/libzip/zip_source_function.c
677 native/ext/libzip/zip_source_zip.c
678 native/ext/libzip/zip_stat.c
679 native/ext/libzip/zip_stat_index.c
680 native/ext/libzip/zip_stat_init.c
681 native/ext/libzip/zip_strerror.c
682 native/ext/libzip/zip_unchange.c
683 native/ext/libzip/zip_unchange_all.c
684 native/ext/libzip/zip_unchange_archive.c
685 native/ext/libzip/zip_unchange_data.c)
686 target_link_libraries(libzip ${ZLIB_LIBRARY})
687 include_directories(native/ext/libzip)
688 set(LIBZIP_LIBRARY libzip)
690 # FindPNG does a few things we don't want. So do it ourselves. Fixed to libpng17
691 find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng17/png.h")
692 find_library(PNG_LIBRARY NAMES png17 libpng17)
693 find_package(PackageHandleStandardArgs)
694 find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
696 include_directories(${PNG_PNG_INCLUDE_DIR})
699 file(GLOB PNG_ARM_INCLUDES native/ext/libpng17/arm/*)
701 add_library(png17 STATIC
702 native/ext/libpng17/pngconf.h
703 native/ext/libpng17/pngdebug.h
704 native/ext/libpng17/png.c
705 native/ext/libpng17/png.h
706 native/ext/libpng17/pngerror.c
707 native/ext/libpng17/pngget.c
708 native/ext/libpng17/pnginfo.h
709 native/ext/libpng17/pnglibconf.h
710 native/ext/libpng17/pngmem.c
711 native/ext/libpng17/pngpread.c
712 native/ext/libpng17/pngpriv.h
713 native/ext/libpng17/pngread.c
714 native/ext/libpng17/pngrio.c
715 native/ext/libpng17/pngrtran.c
716 native/ext/libpng17/pngrutil.c
717 native/ext/libpng17/pngset.c
718 native/ext/libpng17/pngstruct.h
719 native/ext/libpng17/pngtest.c
720 native/ext/libpng17/pngtrans.c
721 native/ext/libpng17/pngwio.c
722 native/ext/libpng17/pngwrite.c
723 native/ext/libpng17/pngwtran.c
724 native/ext/libpng17/pngwutil.c
725 ${PNG_ARM_INCLUDES} )
726 set(PNG_LIBRARY png17)
727 include_directories(native/ext)
735 set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a8")
737 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
738 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
739 set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
741 set(nativeExtra ${nativeExtra}
742 native/math/fast/fast_matrix_neon.S)
745 set(nativeExtra ${nativeExtra}
746 native/math/fast/fast_matrix_sse.c)
751 set(nativeExtra ${nativeExtra}
752 native/base/NativeApp.h
753 native/android/app-android.cpp
754 native/android/native_audio.cpp
755 native/android/native_audio.h)
757 add_library(native_audio SHARED
758 native/android/native-audio-so.cpp
759 native/android/native-audio-so.h)
760 target_link_libraries(native_audio OpenSLES log)
763 set(nativeExtra ${nativeExtra}
767 ios/ViewController.mm
771 ios/iCade/iCadeReaderView.h
772 ios/iCade/iCadeReaderView.m
773 ios/iCade/iCadeState.h)
774 set(nativeExtraLibs ${nativeExtraLibs} "-framework Foundation -framework AudioToolbox -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework UIKit -framework GLKit -framework OpenAL")
775 if(EXISTS "${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks/GameController.framework")
776 set(nativeExtraLibs ${nativeExtraLibs} "-weak_framework GameController")
779 set_source_files_properties(ios/AppDelegate.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
780 set_source_files_properties(ios/ViewController.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
782 set(TargetBin PPSSPP)
785 message(FATAL_ERROR "Cmake does not yet support Qt. Please use qmake instead.")
786 find_package(Qt4 COMPONENTS QtMultimedia QtOpenGL QtGui QtCore)
787 include(${QT_USE_FILE})
788 qt4_wrap_cpp(nativeQtHeader native/base/QtMain.h)
789 set(nativeExtra ${nativeExtra} native/base/QtMain.cpp ${nativeQtHeader})
790 if(NOT MOBILE_DEVICE)
791 qt4_wrap_cpp(nativeQtHeader Qt/mainwindow.h)
792 set(nativeExtra ${nativeExtra} Qt/mainwindow.cpp)
794 set(nativeExtraLibs ${nativeExtraLibs} ${QT_LIBRARIES})
795 set(TargetBin PPSSPPQt)
797 set(nativeExtraLibs ${nativeExtraLibs} "-framework CoreFoundation")
801 set(nativeExtra ${nativeExtra} native/base/BlackberryMain.cpp native/base/BlackberryDisplay.cpp)
802 set(nativeExtraLibs ${nativeExtraLibs} OpenAL bps screen socket EGL)
803 set(TargetBin PPSSPPBlackberry)
805 set(TargetBin PPSSPPSDL)
807 include_directories(${SDL2_INCLUDE_DIR})
808 add_definitions(-DSDL)
809 set(nativeExtra ${nativeExtra}
812 native/base/PCMain.cpp)
813 set(nativeExtraLibs ${nativeExtraLibs} ${SDL2_LIBRARY})
815 set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm)
816 set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY})
818 set(nativeExtraLibs ${nativeExtraLibs} pthread EGL)
820 set(TargetBin PPSSPPSDL)
822 message(FATAL_ERROR "Could not find SDL2. Failing.")
826 android/jni/TestRunner.cpp
828 UI/BackgroundAudio.cpp
836 UI/GameSettingsScreen.cpp
837 UI/TiltAnalogSettingsScreen.cpp
838 UI/TiltEventProcessor.cpp
839 UI/TouchControlLayoutScreen.cpp
840 UI/TouchControlVisibilityScreen.cpp
842 UI/OnScreenDisplay.cpp
843 UI/ControlMappingScreen.cpp
845 UI/SavedataScreen.cpp
848 UI/InstallZipScreen.cpp
852 set(NativeAppSource ${NativeAppSource} android/jni/ArmEmitterTest.cpp)
854 set(nativeExtra ${nativeExtra} ${NativeAppSource})
857 add_library(native STATIC
859 native/base/backtrace.cpp
860 native/base/backtrace.h
861 native/audio/mixer.cpp
863 native/audio/wav_read.cpp
864 native/audio/wav_read.h
865 native/base/basictypes.h
866 native/base/buffer.cpp
869 native/base/colorutil.cpp
870 native/base/colorutil.h
871 native/base/display.cpp
872 native/base/display.h
873 native/base/error_context.cpp
874 native/base/error_context.h
875 native/base/fastlist.h
876 native/base/fastlist_test.cpp
877 native/base/functional.h
878 native/base/linked_ptr.h
879 native/base/logging.h
881 native/base/scoped_ptr.h
883 native/base/stringutil.cpp
884 native/base/stringutil.h
885 native/base/timeutil.cpp
886 native/base/timeutil.h
887 native/data/compression.cpp
888 native/data/compression.h
889 native/ext/vjson/json.cpp
890 native/ext/vjson/json.h
891 native/ext/vjson/block_allocator.cpp
892 native/ext/vjson/block_allocator.h
893 native/file/chunk_file.cpp
894 native/file/chunk_file.h
895 native/file/dialog.cpp
897 native/file/easy_file.cpp
898 native/file/easy_file.h
899 native/file/fd_util.cpp
900 native/file/fd_util.h
901 native/file/file_util.cpp
902 native/file/file_util.h
903 native/file/ini_file.cpp
904 native/file/ini_file.h
908 native/file/zip_read.cpp
909 native/file/zip_read.h
910 native/gfx/gl_common.h
911 native/gfx/gl_debug_log.cpp
912 native/gfx/gl_debug_log.h
913 native/gfx/gl_lost_manager.cpp
914 native/gfx/gl_lost_manager.h
915 native/gfx/texture.cpp
917 native/gfx/texture_atlas.cpp
918 native/gfx/texture_atlas.h
919 # native/gfx/texture_dx11.cpp
920 native/gfx/texture_gen.cpp
921 native/gfx/texture_gen.h
922 native/gfx_es2/draw_buffer.cpp
923 native/gfx_es2/draw_buffer.h
924 native/gfx_es2/draw_text.cpp
925 native/gfx_es2/draw_text.h
926 native/gfx_es2/fbo.cpp
928 native/gfx_es2/gl_state.cpp
929 native/gfx_es2/gl_state.h
930 native/gfx_es2/gpu_features.cpp
931 native/gfx_es2/gpu_features.h
932 native/gfx_es2/glsl_program.cpp
933 native/gfx_es2/glsl_program.h
934 native/gfx_es2/vertex_format.cpp
935 native/gfx_es2/vertex_format.h
936 native/gfx_es2/gl3stub.c
937 native/gfx_es2/gl3stub.h
940 native/image/png_load.cpp
941 native/image/png_load.h
942 native/image/zim_load.cpp
943 native/image/zim_load.h
944 native/image/zim_save.cpp
945 native/image/zim_save.h
946 native/input/gesture_detector.cpp
947 native/input/gesture_detector.h
948 native/input/keycodes.h
949 native/input/input_state.h
950 native/input/input_state.cpp
951 native/math/fast/fast_math.c
952 native/math/fast/fast_matrix.c
953 native/math/curves.cpp
955 native/math/expression_parser.cpp
956 native/math/expression_parser.h
957 native/math/lin/aabb.cpp
958 native/math/lin/aabb.h
959 native/math/lin/matrix4x4.cpp
960 native/math/lin/matrix4x4.h
961 native/math/lin/plane.cpp
962 native/math/lin/plane.h
963 native/math/lin/quat.cpp
964 native/math/lin/quat.h
965 native/math/lin/ray.h
966 native/math/lin/vec3.cpp
967 native/math/lin/vec3.h
968 native/math/math_util.cpp
969 native/math/math_util.h
970 native/net/http_client.cpp
971 native/net/http_client.h
972 native/net/resolve.cpp
976 native/profiler/profiler.cpp
977 native/profiler/profiler.h
978 native/thin3d/thin3d.cpp
979 native/thin3d/thin3d.h
980 native/thin3d/thin3d_gl.cpp
981 native/thread/prioritizedworkqueue.cpp
982 native/thread/prioritizedworkqueue.h
983 native/thread/threadutil.cpp
984 native/thread/threadutil.h
985 native/thread/threadpool.cpp
986 native/thread/threadpool.h
991 native/ui/ui_context.cpp
992 native/ui/ui_context.h
993 native/ui/ui_screen.cpp
994 native/ui/ui_screen.h
997 native/ui/viewgroup.cpp
998 native/ui/viewgroup.h
999 native/ui/virtual_input.cpp
1000 native/ui/virtual_input.h
1001 native/util/bits/bits.cpp
1002 native/util/bits/bits.h
1003 native/util/bits/hamming.h
1004 native/util/bits/varint.cpp
1005 native/util/bits/varint.h
1006 native/util/hash/hash.cpp
1007 native/util/hash/hash.h
1008 native/util/random/perlin.cpp
1009 native/util/random/perlin.h
1010 native/util/random/rng.h
1011 native/util/text/utf8.h
1012 native/util/text/utf8.cpp
1013 native/util/text/parsers.h
1014 native/util/text/parsers.cpp
1015 native/util/const_map.h
1016 native/ext/jpge/jpgd.cpp
1017 native/ext/jpge/jpgd.h
1018 native/ext/jpge/jpge.cpp
1019 native/ext/jpge/jpge.h)
1020 include_directories(native)
1022 if (LINUX AND NOT ANDROID)
1026 target_link_libraries(native ${LIBZIP_LIBRARY} ${PNG_LIBRARY} rg_etc1 vjson stb_vorbis snappy udis86 ${RT_LIB} ${GLEW_LIBRARIES})
1029 target_link_libraries(native log EGL)
1031 target_link_libraries(native ws2_32 winmm)
1033 setup_target_project(native native)
1035 add_library(kirk STATIC
1038 ext/libkirk/amctrl.c
1039 ext/libkirk/amctrl.h
1044 ext/libkirk/kirk_engine.c
1045 ext/libkirk/kirk_engine.h)
1046 include_directories(ext/libkirk)
1048 add_library(sfmt19937 STATIC
1049 ext/sfmt19937/SFMT.c
1050 ext/sfmt19937/SFMT.h
1051 ext/sfmt19937/SFMT-common.h
1052 ext/sfmt19937/SFMT-params.h
1053 ext/sfmt19937/SFMT-params19937.h
1055 include_directories(ext/sfmt19937)
1057 add_library(xbrz STATIC
1061 include_directories(ext/xbrz)
1063 add_library(xxhash STATIC
1067 include_directories(ext/xxhash)
1072 set(CoreExtra ${CoreExtra}
1073 Core/MIPS/ARM/ArmAsm.cpp
1074 Core/MIPS/ARM/ArmAsm.h
1075 Core/MIPS/ARM/ArmCompALU.cpp
1076 Core/MIPS/ARM/ArmCompBranch.cpp
1077 Core/MIPS/ARM/ArmCompFPU.cpp
1078 Core/MIPS/ARM/ArmCompLoadStore.cpp
1079 Core/MIPS/ARM/ArmCompVFPU.cpp
1080 Core/MIPS/ARM/ArmCompVFPUNEON.cpp
1081 Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp
1082 Core/MIPS/ARM/ArmCompReplace.cpp
1083 Core/MIPS/ARM/ArmJit.cpp
1084 Core/MIPS/ARM/ArmJit.h
1085 Core/MIPS/ARM/ArmRegCache.cpp
1086 Core/MIPS/ARM/ArmRegCache.h
1087 Core/MIPS/ARM/ArmRegCacheFPU.cpp
1088 Core/MIPS/ARM/ArmRegCacheFPU.h
1089 GPU/Common/VertexDecoderArm.cpp
1092 set(CoreExtra ${CoreExtra}
1093 Core/MIPS/ARM64/Arm64Asm.cpp
1094 Core/MIPS/ARM64/Arm64Asm.h
1095 Core/MIPS/ARM64/Arm64CompALU.cpp
1096 Core/MIPS/ARM64/Arm64CompBranch.cpp
1097 Core/MIPS/ARM64/Arm64CompFPU.cpp
1098 Core/MIPS/ARM64/Arm64CompLoadStore.cpp
1099 Core/MIPS/ARM64/Arm64CompVFPU.cpp
1100 Core/MIPS/ARM64/Arm64CompReplace.cpp
1101 Core/MIPS/ARM64/Arm64Jit.cpp
1102 Core/MIPS/ARM64/Arm64Jit.h
1103 Core/MIPS/ARM64/Arm64RegCache.cpp
1104 Core/MIPS/ARM64/Arm64RegCache.h
1105 Core/MIPS/ARM64/Arm64RegCacheFPU.cpp
1106 Core/MIPS/ARM64/Arm64RegCacheFPU.h
1107 GPU/Common/VertexDecoderArm.cpp
1108 Core/Util/DisArm64.cpp)
1110 set(CoreExtra ${CoreExtra}
1111 Core/MIPS/x86/Asm.cpp
1113 Core/MIPS/x86/CompALU.cpp
1114 Core/MIPS/x86/CompBranch.cpp
1115 Core/MIPS/x86/CompFPU.cpp
1116 Core/MIPS/x86/CompLoadStore.cpp
1117 Core/MIPS/x86/CompVFPU.cpp
1118 Core/MIPS/x86/CompReplace.cpp
1119 Core/MIPS/x86/Jit.cpp
1121 Core/MIPS/x86/JitSafeMem.cpp
1122 Core/MIPS/x86/JitSafeMem.h
1123 Core/MIPS/x86/RegCache.cpp
1124 Core/MIPS/x86/RegCache.h
1125 Core/MIPS/x86/RegCacheFPU.cpp
1126 Core/MIPS/x86/RegCacheFPU.h
1127 GPU/Common/VertexDecoderX86.cpp
1130 set(CoreExtra ${CoreExtra}
1131 Core/MIPS/MIPS/MipsJit.cpp
1132 Core/MIPS/MIPS/MipsJit.h
1133 GPU/Common/VertexDecoderFake.cpp
1136 set(CoreExtra ${CoreExtra}
1137 Core/MIPS/fake/FakeJit.cpp
1138 Core/MIPS/fake/FakeJit.h
1139 GPU/Common/VertexDecoderFake.cpp
1144 set(CORE_NEON Core/Util/AudioFormatNEON.cpp Core/Util/AudioFormatNEON.h)
1147 # 'ppsspp_jni' on ANDROID, 'Core' everywhere else
1148 # SHARED on ANDROID, STATIC everywhere else
1149 add_library(${CoreLibName} ${CoreLinkType}
1155 Core/CoreParameter.h
1162 Core/ThreadEventQueue.h
1163 Core/Debugger/Breakpoints.cpp
1164 Core/Debugger/Breakpoints.h
1165 Core/Debugger/DebugInterface.h
1166 Core/Debugger/SymbolMap.cpp
1167 Core/Debugger/SymbolMap.h
1168 Core/Debugger/DisassemblyManager.cpp
1169 Core/Debugger/DisassemblyManager.h
1170 Core/Dialog/PSPDialog.cpp
1171 Core/Dialog/PSPDialog.h
1172 Core/Dialog/PSPGamedataInstallDialog.cpp
1173 Core/Dialog/PSPGamedataInstallDialog.h
1174 Core/Dialog/PSPMsgDialog.cpp
1175 Core/Dialog/PSPMsgDialog.h
1176 Core/Dialog/PSPNetconfDialog.cpp
1177 Core/Dialog/PSPNetconfDialog.h
1178 Core/Dialog/PSPOskDialog.cpp
1179 Core/Dialog/PSPOskDialog.h
1180 Core/Dialog/PSPPlaceholderDialog.cpp
1181 Core/Dialog/PSPPlaceholderDialog.h
1182 Core/Dialog/PSPSaveDialog.cpp
1183 Core/Dialog/PSPSaveDialog.h
1184 Core/Dialog/PSPScreenshotDialog.cpp
1185 Core/Dialog/PSPScreenshotDialog.h
1186 Core/Dialog/SavedataParam.cpp
1187 Core/Dialog/SavedataParam.h
1188 Core/ELF/ElfReader.cpp
1189 Core/ELF/ElfReader.h
1191 Core/ELF/PBPReader.cpp
1192 Core/ELF/PBPReader.h
1193 Core/ELF/PrxDecrypter.cpp
1194 Core/ELF/PrxDecrypter.h
1195 Core/ELF/ParamSFO.cpp
1197 Core/FileSystems/tlzrc.cpp
1198 Core/FileSystems/BlockDevices.cpp
1199 Core/FileSystems/BlockDevices.h
1200 Core/FileSystems/DirectoryFileSystem.cpp
1201 Core/FileSystems/DirectoryFileSystem.h
1202 Core/FileSystems/FileSystem.h
1203 Core/FileSystems/FileSystem.cpp
1204 Core/FileSystems/ISOFileSystem.cpp
1205 Core/FileSystems/ISOFileSystem.h
1206 Core/FileSystems/MetaFileSystem.cpp
1207 Core/FileSystems/MetaFileSystem.h
1208 Core/FileSystems/VirtualDiscFileSystem.cpp
1209 Core/FileSystems/VirtualDiscFileSystem.h
1212 Core/HLE/FunctionWrappers.h
1215 Core/HLE/ReplaceTables.cpp
1216 Core/HLE/ReplaceTables.h
1217 Core/HLE/HLEHelperThread.cpp
1218 Core/HLE/HLEHelperThread.h
1219 Core/HLE/HLETables.cpp
1220 Core/HLE/HLETables.h
1221 Core/HLE/KernelWaitHelpers.h
1222 Core/HLE/__sceAudio.cpp
1223 Core/HLE/__sceAudio.h
1224 Core/HLE/sceAdler.cpp
1226 Core/HLE/sceAtrac.cpp
1228 Core/HLE/sceAudio.cpp
1229 Core/HLE/sceAudiocodec.cpp
1230 Core/HLE/sceAudiocodec.h
1231 Core/HLE/sceAudioRouting.cpp
1232 Core/HLE/sceAudioRouting.h
1236 Core/HLE/sceChnnlsv.cpp
1237 Core/HLE/sceChnnlsv.h
1238 Core/HLE/sceCtrl.cpp
1240 Core/HLE/sceDeflt.cpp
1242 Core/HLE/sceDisplay.cpp
1243 Core/HLE/sceDisplay.h
1244 Core/HLE/sceDmac.cpp
1246 Core/HLE/sceG729.cpp
1248 Core/HLE/sceGameUpdate.cpp
1249 Core/HLE/sceGameUpdate.h
1252 Core/HLE/sceFont.cpp
1254 Core/HLE/sceHeap.cpp
1256 Core/HLE/sceHprm.cpp
1258 Core/HLE/sceHttp.cpp
1260 Core/HLE/sceImpose.cpp
1261 Core/HLE/sceImpose.h
1264 Core/HLE/sceJpeg.cpp
1266 Core/HLE/sceKernel.cpp
1267 Core/HLE/sceKernel.h
1268 Core/HLE/sceKernelAlarm.cpp
1269 Core/HLE/sceKernelAlarm.h
1270 Core/HLE/sceKernelEventFlag.cpp
1271 Core/HLE/sceKernelEventFlag.h
1272 Core/HLE/sceKernelInterrupt.cpp
1273 Core/HLE/sceKernelInterrupt.h
1274 Core/HLE/sceKernelMbx.cpp
1275 Core/HLE/sceKernelMbx.h
1276 Core/HLE/sceKernelMemory.cpp
1277 Core/HLE/sceKernelMemory.h
1278 Core/HLE/sceKernelModule.cpp
1279 Core/HLE/sceKernelModule.h
1280 Core/HLE/sceKernelMsgPipe.cpp
1281 Core/HLE/sceKernelMsgPipe.h
1282 Core/HLE/sceKernelMutex.cpp
1283 Core/HLE/sceKernelMutex.h
1284 Core/HLE/sceKernelSemaphore.cpp
1285 Core/HLE/sceKernelSemaphore.h
1286 Core/HLE/sceKernelThread.cpp
1287 Core/HLE/sceKernelThread.h
1288 Core/HLE/sceKernelTime.cpp
1289 Core/HLE/sceKernelTime.h
1290 Core/HLE/sceKernelVTimer.cpp
1291 Core/HLE/sceKernelVTimer.h
1292 Core/HLE/sceMpeg.cpp
1296 Core/HLE/sceNetAdhoc.cpp
1297 Core/HLE/sceNetAdhoc.h
1299 Core/HLE/proAdhoc.cpp
1300 Core/HLE/proAdhocServer.h
1301 Core/HLE/proAdhocServer.cpp
1302 Core/HLE/sceOpenPSID.cpp
1303 Core/HLE/sceOpenPSID.h
1304 Core/HLE/sceP3da.cpp
1306 Core/HLE/sceMt19937.cpp
1307 Core/HLE/sceMt19937.h
1314 Core/HLE/sceParseHttp.cpp
1315 Core/HLE/sceParseHttp.h
1316 Core/HLE/sceParseUri.cpp
1317 Core/HLE/sceParseUri.h
1318 Core/HLE/scePower.cpp
1320 Core/HLE/scePsmf.cpp
1326 Core/HLE/sceSfmt19937.cpp
1327 Core/HLE/sceSfmt19937.h
1328 Core/HLE/sceSha256.cpp
1329 Core/HLE/sceSha256.h
1336 Core/HLE/sceUsbGps.cpp
1337 Core/HLE/sceUsbGps.h
1338 Core/HLE/sceUtility.cpp
1339 Core/HLE/sceUtility.h
1340 Core/HLE/sceVaudio.cpp
1341 Core/HLE/sceVaudio.h
1342 Core/HLE/scePspNpDrm_user.cpp
1343 Core/HLE/scePspNpDrm_user.h
1346 Core/HLE/scePauth.cpp
1348 Core/HW/SimpleAudioDec.cpp
1349 Core/HW/SimpleAudioDec.h
1350 Core/HW/AsyncIOManager.cpp
1351 Core/HW/AsyncIOManager.h
1352 Core/HW/MediaEngine.cpp
1353 Core/HW/MediaEngine.h
1354 Core/HW/MpegDemux.cpp
1356 Core/HW/MemoryStick.cpp
1357 Core/HW/MemoryStick.h
1358 Core/HW/SasAudio.cpp
1360 Core/HW/StereoResampler.cpp
1361 Core/HW/StereoResampler.h
1366 Core/FileLoaders/CachingFileLoader.cpp
1367 Core/FileLoaders/CachingFileLoader.h
1368 Core/FileLoaders/DiskCachingFileLoader.cpp
1369 Core/FileLoaders/DiskCachingFileLoader.h
1370 Core/FileLoaders/HTTPFileLoader.cpp
1371 Core/FileLoaders/HTTPFileLoader.h
1372 Core/FileLoaders/LocalFileLoader.cpp
1373 Core/FileLoaders/LocalFileLoader.h
1374 Core/FileLoaders/RetryingFileLoader.cpp
1375 Core/FileLoaders/RetryingFileLoader.h
1376 Core/MIPS/JitCommon/JitCommon.cpp
1377 Core/MIPS/JitCommon/JitCommon.h
1378 Core/MIPS/JitCommon/NativeJit.h
1379 Core/MIPS/JitCommon/JitBlockCache.cpp
1380 Core/MIPS/JitCommon/JitBlockCache.h
1381 Core/MIPS/JitCommon/JitState.cpp
1382 Core/MIPS/JitCommon/JitState.h
1385 Core/MIPS/MIPSAnalyst.cpp
1386 Core/MIPS/MIPSAnalyst.h
1387 Core/MIPS/MIPSCodeUtils.cpp
1388 Core/MIPS/MIPSCodeUtils.h
1389 Core/MIPS/MIPSDebugInterface.cpp
1390 Core/MIPS/MIPSDebugInterface.h
1391 Core/MIPS/MIPSDis.cpp
1393 Core/MIPS/MIPSDisVFPU.cpp
1394 Core/MIPS/MIPSDisVFPU.h
1395 Core/MIPS/MIPSInt.cpp
1397 Core/MIPS/MIPSIntVFPU.cpp
1398 Core/MIPS/MIPSIntVFPU.h
1399 Core/MIPS/MIPSStackWalk.cpp
1400 Core/MIPS/MIPSStackWalk.h
1401 Core/MIPS/MIPSTables.cpp
1402 Core/MIPS/MIPSTables.h
1403 Core/MIPS/MIPSVFPUUtils.cpp
1404 Core/MIPS/MIPSVFPUUtils.h
1405 Core/MIPS/MIPSAsm.cpp
1409 Core/MemMapFunctions.cpp
1410 Core/MemMapHelpers.h
1421 Core/Util/AudioFormat.cpp
1422 Core/Util/AudioFormat.h
1423 Core/Util/GameManager.cpp
1424 Core/Util/GameManager.h
1425 Core/Util/BlockAllocator.cpp
1426 Core/Util/BlockAllocator.h
1427 Core/Util/PPGeDraw.cpp
1428 Core/Util/PPGeDraw.h
1429 Core/Util/ppge_atlas.cpp
1430 Core/Util/ppge_atlas.h
1432 $<TARGET_OBJECTS:GPU>
1435 target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash
1436 ${CoreExtraLibs} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} ${CMAKE_DL_LIBS})
1437 setup_target_project(${CoreLibName} Core)
1439 # Generate git-version.cpp at build time.
1440 add_custom_target(GitVersion ALL
1441 DEPENDS something_that_never_exists)
1442 add_custom_command(OUTPUT something_that_never_exists
1443 COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
1444 -P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
1446 set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp
1447 PROPERTIES GENERATED TRUE)
1448 add_dependencies(${CoreLibName} GitVersion)
1451 set(GPU_NEON GPU/Common/TextureDecoderNEON.cpp)
1453 add_library(GPU OBJECT
1454 GPU/Common/DepalettizeShaderCommon.cpp
1455 GPU/Common/DepalettizeShaderCommon.h
1456 GPU/Common/FramebufferCommon.cpp
1457 GPU/Common/FramebufferCommon.h
1458 GPU/Common/GPUDebugInterface.h
1459 GPU/Common/DrawEngineCommon.cpp
1460 GPU/Common/DrawEngineCommon.h
1461 GPU/Common/SplineCommon.cpp
1462 GPU/Common/SplineCommon.h
1463 GPU/Common/SoftwareTransformCommon.cpp
1464 GPU/Common/SoftwareTransformCommon.h
1465 GPU/Common/VertexDecoderCommon.cpp
1466 GPU/Common/VertexDecoderCommon.h
1467 GPU/Common/TransformCommon.cpp
1468 GPU/Common/TransformCommon.h
1469 GPU/Common/IndexGenerator.cpp
1470 GPU/Common/IndexGenerator.h
1471 GPU/Common/TextureDecoder.cpp
1472 GPU/Common/TextureDecoder.h
1473 GPU/Common/TextureCacheCommon.cpp
1474 GPU/Common/TextureCacheCommon.h
1475 GPU/Common/TextureScalerCommon.cpp
1476 GPU/Common/TextureScalerCommon.h
1478 GPU/Common/PostShader.cpp
1479 GPU/Common/PostShader.h
1480 GPU/Common/SplineCommon.h
1481 GPU/Debugger/Breakpoints.cpp
1482 GPU/Debugger/Breakpoints.h
1483 GPU/Debugger/Stepping.cpp
1484 GPU/Debugger/Stepping.h
1485 GPU/GLES/DepalettizeShader.cpp
1486 GPU/GLES/DepalettizeShader.h
1487 GPU/GLES/GLES_GPU.cpp
1489 GPU/GLES/FragmentShaderGenerator.cpp
1490 GPU/GLES/FragmentShaderGenerator.h
1491 GPU/GLES/FragmentTestCache.cpp
1492 GPU/GLES/FragmentTestCache.h
1493 GPU/GLES/Framebuffer.cpp
1494 GPU/GLES/Framebuffer.h
1495 GPU/GLES/ShaderManager.cpp
1496 GPU/GLES/ShaderManager.h
1497 GPU/GLES/StateMapping.cpp
1498 GPU/GLES/StateMapping.h
1499 GPU/GLES/StencilBuffer.cpp
1500 GPU/GLES/TextureCache.cpp
1501 GPU/GLES/TextureCache.h
1502 GPU/GLES/TextureScaler.cpp
1503 GPU/GLES/TextureScaler.h
1504 GPU/GLES/TransformPipeline.cpp
1505 GPU/GLES/TransformPipeline.h
1506 GPU/GLES/VertexShaderGenerator.cpp
1507 GPU/GLES/VertexShaderGenerator.h
1519 GPU/Null/NullGpu.cpp
1521 GPU/Software/Clipper.cpp
1522 GPU/Software/Clipper.h
1523 GPU/Software/Lighting.cpp
1524 GPU/Software/Lighting.h
1525 GPU/Software/Rasterizer.cpp
1526 GPU/Software/Rasterizer.h
1527 GPU/Software/SoftGpu.cpp
1528 GPU/Software/SoftGpu.h
1529 GPU/Software/TransformUnit.cpp
1530 GPU/Software/TransformUnit.h
1532 setup_target_project(GPU GPU)
1535 add_executable(PPSSPPWindows WIN32
1536 Windows/Breakpoints.h
1537 Windows/DSoundStream.cpp
1538 Windows/DSoundStream.h
1539 Windows/Debugger/CPURegsInterface.h
1540 Windows/Debugger/BreakpointWindow.cpp
1541 Windows/Debugger/BreakpointWindow.h
1542 Windows/Debugger/CtrlDisAsmView.cpp
1543 Windows/Debugger/CtrlDisAsmView.h
1544 Windows/Debugger/CtrlMemView.cpp
1545 Windows/Debugger/CtrlMemView.h
1546 Windows/Debugger/CtrlRegisterList.cpp
1547 Windows/Debugger/CtrlRegisterList.h
1548 Windows/Debugger/Debugger.h
1549 Windows/Debugger/DebuggerShared.cpp
1550 Windows/Debugger/DebuggerShared.h
1551 Windows/Debugger/Debugger_Disasm.cpp
1552 Windows/Debugger/Debugger_Disasm.h
1553 Windows/Debugger/Debugger_MemoryDlg.cpp
1554 Windows/Debugger/Debugger_MemoryDlg.h
1555 Windows/Debugger/Debugger_Lists.cpp
1556 Windows/Debugger/Debugger_Lists.h
1557 Windows/Debugger/Debugger_Misc.cpp
1558 Windows/Debugger/Debugger_Misc.h
1559 # Windows/Debugger/Debugger_Profiler.cpp
1560 # Windows/Debugger/Debugger_Profiler.h
1561 Windows/Debugger/Debugger_SymbolMap.h
1562 Windows/Debugger/Debugger_VFPUDlg.cpp
1563 Windows/Debugger/Debugger_VFPUDlg.h
1564 Windows/Debugger/SimpleELF.h
1565 # Windows/DlgDynaView.cpp
1566 # Windows/DlgDynaView.h
1567 Windows/EmuThread.cpp
1570 Windows/InputBox.cpp
1572 Windows/InputDevice.cpp
1573 Windows/InputDevice.h
1574 Windows/KeyboardDevice.cpp
1575 Windows/KeyboardDevice.h
1576 Windows/MIPSCompALU.h
1577 Windows/MIPSCompBranch.h
1578 Windows/OpenGLBase.cpp
1579 Windows/OpenGLBase.h
1580 Windows/W32Util/DialogManager.cpp
1581 Windows/W32Util/DialogManager.h
1582 Windows/W32Util/Misc.cpp
1583 Windows/W32Util/Misc.h
1584 Windows/W32Util/PropertySheet.cpp
1585 Windows/W32Util/PropertySheet.h
1586 Windows/W32Util/ShellUtil.cpp
1587 Windows/W32Util/ShellUtil.h
1588 Windows/W32Util/XPTheme.h
1589 Windows/WindowsFileSystem.h
1590 Windows/WindowsHost.cpp
1591 Windows/WindowsHost.h
1592 Windows/WndMainWindow.cpp
1593 Windows/WndMainWindow.h
1595 Windows/XinputDevice.cpp
1596 Windows/XinputDevice.h
1603 target_link_libraries(PPSSPPWindows ${CoreLibName}
1604 kernel32 user32 gdi32 shell32 comctl32 dsound xinput)
1605 setup_target_project(PPSSPPWindows Windows)
1609 android/assets/ui_atlas.zim
1611 assets/ppge_atlas.zim
1612 assets/langregion.ini
1614 set(LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT} ${nativeExtraLibs})
1618 add_executable(PPSSPPHeadless
1619 headless/Headless.cpp
1620 UI/OnScreenDisplay.cpp
1622 headless/Compare.cpp
1624 target_link_libraries(PPSSPPHeadless
1625 ${COCOA_LIBRARY} ${LinkCommon})
1626 setup_target_project(PPSSPPHeadless headless)
1630 add_executable(unitTest
1631 unittest/UnitTest.cpp
1632 unittest/TestArmEmitter.cpp
1633 unittest/TestArm64Emitter.cpp
1634 unittest/TestX64Emitter.cpp
1635 unittest/TestVertexJit.cpp
1636 unittest/JitHarness.cpp
1637 Core/MIPS/ARM/ArmRegCache.cpp
1638 Core/MIPS/ARM/ArmRegCacheFPU.cpp
1639 UI/OnScreenDisplay.cpp
1641 target_link_libraries(unitTest
1642 ${COCOA_LIBRARY} ${LinkCommon} Common)
1643 setup_target_project(unitTest unittest)
1648 if (APPLE AND NOT IOS)
1649 set(ICON_PATH_ABS ${CMAKE_CURRENT_SOURCE_DIR}/assets/ppsspp.icns)
1650 set( MACOSX_BUNDLE_ICON_FILE ppsspp.icns )
1651 set_source_files_properties(${ICON_PATH_ABS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
1654 # TODO: there must a native way to copy these.
1655 # Now this is very prone to errors when changes occur.
1656 # Also better to have assets under Resources dir for OS X.
1657 file(GLOB_RECURSE FLASH0_FILES flash0/*)
1658 file(GLOB_RECURSE LANG_FILES lang/*)
1659 file(GLOB_RECURSE SHADER_FILES assets/shaders/*)
1661 if (APPLE AND NOT IOS)
1662 set_source_files_properties(${NativeAssets} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets")
1663 set_source_files_properties(${FLASH0_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets/flash0/font")
1664 set_source_files_properties(${LANG_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets/lang")
1665 set_source_files_properties(${SHADER_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets/shaders")
1668 add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${SHADER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource})
1670 add_executable(${TargetBin} ${NativeAppSource})
1672 target_link_libraries(${TargetBin} ${LinkCommon} Common)
1676 file(INSTALL ${NativeAssets} DESTINATION assets)
1677 file(INSTALL flash0 lang DESTINATION assets)
1679 if(APPLE AND NOT IOS)
1680 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -F /Library/Frameworks")
1683 # packaging and code signing
1685 add_dependencies(PPSSPP ${CoreLibName} GPU Common native)
1687 file(GLOB IOSAssets ios/assets/*.png)
1688 file(INSTALL ${IOSAssets} DESTINATION assets)
1690 file(INSTALL pspautotests DESTINATION assets)
1692 set(RSRC_XIB_FILES assets/Icon@2x.png)
1693 set_source_files_properties(${RSRC_XIB_FILES}
1694 PROPERTIES MACOSX_PACKAGE_LOCATION Resources
1696 set(APP_DIR_NAME \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME})
1697 add_custom_command(TARGET PPSSPP POST_BUILD
1698 COMMAND tar -c -C . --exclude .DS_Store --exclude .git -H gnu assets | tar -x -C '${APP_DIR_NAME}'
1700 # Force Xcode to relink the binary.
1701 add_custom_command(TARGET Core PRE_BUILD
1702 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
1703 COMMAND rm -f PPSSPP.build/{Debug,Release,MinSizeRel,RelWithDebInfo}-iphoneos/PPSSPP.build/Objects-normal/*/PPSSPP {Debug,Release,MinSizeRel,RelWithDebInfo}-iphoneos/PPSSPP.app/PPSSPP
1705 set_target_properties(${TargetBin} PROPERTIES
1706 MACOSX_BUNDLE_INFO_PLIST "../ios/PPSSPP-Info.plist"
1707 XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "iPhone/iPad"
1708 XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES