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
379 include_directories(Common)
380 setup_target_project(Common Common)
383 target_link_libraries(Common winmm)
387 include_directories(${OPENGL_INCLUDE_DIR})
389 add_definitions(-DGLEW_STATIC)
390 add_library(glew STATIC
391 native/ext/glew/GL/glew.h
392 native/ext/glew/GL/glxew.h
393 native/ext/glew/GL/wglew.h
394 native/ext/glew/glew.c)
395 target_link_libraries(glew ${OPENGL_LIBRARIES})
396 include_directories(native/ext/glew)
397 set(GLEW_LIBRARIES glew)
400 add_subdirectory(ext/snappy)
401 add_subdirectory(ext/udis86)
403 add_library(vjson STATIC
404 native/ext/vjson/json.cpp
405 native/ext/vjson/json.h
406 native/ext/vjson/block_allocator.cpp
407 native/ext/vjson/block_allocator.h
410 add_library(rg_etc1 STATIC
411 native/ext/rg_etc1/rg_etc1.cpp
412 native/ext/rg_etc1/rg_etc1.h)
413 include_directories(native/ext/rg_etc1)
415 add_library(stb_vorbis STATIC
416 native/ext/stb_vorbis/stb_vorbis.c
417 native/ext/stb_vorbis/stb_vorbis.h)
418 include_directories(native/ext/stb_vorbis)
421 if(USE_SYSTEM_FFMPEG)
424 set(FFMPEG_FOUND OFF)
427 if(NOT DEFINED FFMPEG_BUILDDIR)
430 set(PLATFORM_ARCH "android/armv7")
432 set(PLATFORM_ARCH "android/arm")
434 set(PLATFORM_ARCH "android/x86")
437 set(PLATFORM_ARCH "blackberry/armv7")
439 set(PLATFORM_ARCH "ios/universal")
441 set(PLATFORM_ARCH "macosx/x86_64")
444 set(PLATFORM_ARCH "linux/armv7")
446 set(PLATFORM_ARCH "linux/arm")
448 set(PLATFORM_ARCH "linux/mips32")
449 elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
450 set(PLATFORM_ARCH "linux/x86_64")
452 set(PLATFORM_ARCH "linux/x86")
455 # Using static libraries
456 if (DEFINED PLATFORM_ARCH)
457 include_directories(ffmpeg/${PLATFORM_ARCH}/include)
458 link_directories(ffmpeg/${PLATFORM_ARCH}/lib)
459 set(FFMPEG_LIBRARIES libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a)
461 # Manual definition of system library locations by the user.
462 if (DEFINED FFMPEG_INCLUDE_PATH)
463 include_directories(ffmpeg ${FFMPEG_INCLUDE_PATH})
465 if (DEFINED AVFORMAT_PATH)
466 add_library(libavformat STATIC IMPORTED)
467 set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${AVFORMAT_PATH})
468 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavformat)
470 if (DEFINED AVCODEC_PATH)
471 add_library(libavcodec STATIC IMPORTED)
472 set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${AVCODEC_PATH})
473 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavcodec)
475 if (DEFINED AVUTIL_PATH)
476 add_library(libavutil STATIC IMPORTED)
477 set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${AVUTIL_PATH})
478 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libavutil)
480 if (DEFINED SWRESAMPLE_PATH)
481 add_library(libswresample STATIC IMPORTED)
482 set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${SWRESAMPLE_PATH})
483 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswresample)
485 if (DEFINED SWSCALE_PATH)
486 add_library(libswscale STATIC IMPORTED)
487 set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${SWSCALE_PATH})
488 SET (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} libswscale)
490 endif(DEFINED PLATFORM_ARCH)
491 else(NOT DEFINED FFMPEG_BUILDDIR)
492 # Using shared libraries
493 include_directories(ffmpeg ${FFMPEG_BUILDDIR})
495 add_library(libavformat STATIC IMPORTED)
496 set_target_properties(libavformat PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavformat/libavformat.a)
497 add_library(libavcodec STATIC IMPORTED)
498 set_target_properties(libavcodec PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavcodec/libavcodec.a)
499 add_library(libavutil STATIC IMPORTED)
500 set_target_properties(libavutil PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libavutil/libavutil.a)
501 add_library(libswresample STATIC IMPORTED)
502 set_target_properties(libswresample PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswresample/libswresample.a)
503 add_library(libswscale STATIC IMPORTED)
504 set_target_properties(libswscale PROPERTIES IMPORTED_LOCATION ${FFMPEG_BUILDDIR}/libswscale/libswscale.a)
506 SET (FFMPEG_LIBRARIES
513 endif(NOT DEFINED FFMPEG_BUILDDIR)
514 endif(NOT FFMPEG_FOUND)
516 find_library(ICONV_LIBRARY NAMES iconv)
518 set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${ICONV_LIBRARY})
522 set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} bz2 "-framework CoreVideo")
524 set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} "-framework VideoDecodeAcceleration")
529 set(nativeExtraLibs ${nativeExtraLibs} ${FFMPEG_LIBRARIES})
531 set(LinkCommon ${LinkCommon} ${FFMPEG_LIBRARIES})
533 target_link_libraries(Common ${FFMPEG_LIBRARIES})
534 add_definitions(-DUSE_FFMPEG)
537 # Modification to show where we are pulling the ffmpeg libraries from.
538 if(USE_FFMPEG AND DEFINED FFMPEG_LIBRARIES)
539 message(STATUS "FFMPEG library locations:")
541 message(STATUS "libavcodec location: ${FFMPEG_avcodec_LIBRARY}")
542 message(STATUS "libavformat location: ${FFMPEG_avformat_LIBRARY}")
543 message(STATUS "libavutil location: ${FFMPEG_avutil_LIBRARY}")
544 message(STATUS "libswresample location: ${FFMPEG_swresample_LIBRARY}")
545 message(STATUS "libswscale location: ${FFMPEG_swscale_LIBRARY}")
546 elseif(DEFINED PLATFORM_ARCH)
547 set(TEMP ${CMAKE_SOURCE_DIR}/ffmpeg/${PLATFORM_ARCH}/lib)
548 message(STATUS "libavcodec location: ${TEMP}/libavcodec.a")
549 message(STATUS "libavformat location: ${TEMP}/libavformat.a")
550 message(STATUS "libavutil location: ${TEMP}/libavutil.a")
551 message(STATUS "libswresample location: ${TEMP}/libswresample.a")
552 message(STATUS "libswscale location: ${TEMP}/libswscale.a")
554 get_target_property(TEMP libavcodec IMPORTED_LOCATION)
555 message(STATUS "libavcodec location: ${TEMP}")
556 get_target_property(TEMP libavformat IMPORTED_LOCATION)
557 message(STATUS "libavformat location: ${TEMP}")
558 get_target_property(TEMP libavutil IMPORTED_LOCATION)
559 message(STATUS "libavutil location: ${TEMP}")
560 get_target_property(TEMP libswresample IMPORTED_LOCATION)
561 message(STATUS "libswresample location: ${TEMP}")
562 get_target_property(TEMP libswscale IMPORTED_LOCATION)
563 message(STATUS "libswscale location: ${TEMP}")
566 message(STATUS "ERROR: No FFMPEG library locations")
569 if(USE_FFMPEG AND NOT DEFINED FFMPEG_LIBRARIES)
570 message(WARNING "FFMPEG_BUILDDIR variable or manual path definition is required to enable FFmpeg. Disabling it.")
576 include_directories(${ZLIB_INCLUDE_DIR})
578 add_library(zlib STATIC
598 ext/zlib/make_vms.com
607 include_directories(ext/zlib)
608 set(ZLIB_LIBRARY zlib)
611 add_library(cityhash STATIC
612 native/ext/cityhash/city.cpp
613 native/ext/cityhash/city.h
614 native/ext/cityhash/citycrc.h
616 include_directories(ext/cityhash)
619 # These can be fast even for debug.
620 set_target_properties(snappy PROPERTIES COMPILE_FLAGS "-O3")
621 set_target_properties(udis86 PROPERTIES COMPILE_FLAGS "-O3")
622 set_target_properties(cityhash PROPERTIES COMPILE_FLAGS "-O3")
624 set_target_properties(zlib PROPERTIES COMPILE_FLAGS "-O3")
629 add_library(libzip STATIC
630 native/ext/libzip/zip.h
631 native/ext/libzip/mkstemp.c
632 native/ext/libzip/zip_add.c
633 native/ext/libzip/zip_add_dir.c
634 native/ext/libzip/zip_close.c
635 native/ext/libzip/zip_delete.c
636 native/ext/libzip/zip_dirent.c
637 native/ext/libzip/zip_entry_free.c
638 native/ext/libzip/zip_entry_new.c
639 native/ext/libzip/zip_err_str.c
640 native/ext/libzip/zip_error.c
641 native/ext/libzip/zip_error_clear.c
642 native/ext/libzip/zip_error_get.c
643 native/ext/libzip/zip_error_get_sys_type.c
644 native/ext/libzip/zip_error_strerror.c
645 native/ext/libzip/zip_error_to_str.c
646 native/ext/libzip/zip_fclose.c
647 native/ext/libzip/zip_file_error_clear.c
648 native/ext/libzip/zip_file_error_get.c
649 native/ext/libzip/zip_file_get_offset.c
650 native/ext/libzip/zip_file_strerror.c
651 native/ext/libzip/zip_filerange_crc.c
652 native/ext/libzip/zip_fopen.c
653 native/ext/libzip/zip_fopen_index.c
654 native/ext/libzip/zip_fread.c
655 native/ext/libzip/zip_free.c
656 native/ext/libzip/zip_get_archive_comment.c
657 native/ext/libzip/zip_get_archive_flag.c
658 native/ext/libzip/zip_get_file_comment.c
659 native/ext/libzip/zip_get_name.c
660 native/ext/libzip/zip_get_num_files.c
661 native/ext/libzip/zip_memdup.c
662 native/ext/libzip/zip_name_locate.c
663 native/ext/libzip/zip_new.c
664 native/ext/libzip/zip_open.c
665 native/ext/libzip/zip_rename.c
666 native/ext/libzip/zip_replace.c
667 native/ext/libzip/zip_set_archive_comment.c
668 native/ext/libzip/zip_set_archive_flag.c
669 native/ext/libzip/zip_set_file_comment.c
670 native/ext/libzip/zip_set_name.c
671 native/ext/libzip/zip_source_buffer.c
672 native/ext/libzip/zip_source_file.c
673 native/ext/libzip/zip_source_filep.c
674 native/ext/libzip/zip_source_free.c
675 native/ext/libzip/zip_source_function.c
676 native/ext/libzip/zip_source_zip.c
677 native/ext/libzip/zip_stat.c
678 native/ext/libzip/zip_stat_index.c
679 native/ext/libzip/zip_stat_init.c
680 native/ext/libzip/zip_strerror.c
681 native/ext/libzip/zip_unchange.c
682 native/ext/libzip/zip_unchange_all.c
683 native/ext/libzip/zip_unchange_archive.c
684 native/ext/libzip/zip_unchange_data.c)
685 target_link_libraries(libzip ${ZLIB_LIBRARY})
686 include_directories(native/ext/libzip)
687 set(LIBZIP_LIBRARY libzip)
689 # FindPNG does a few things we don't want. So do it ourselves. Fixed to libpng17
690 find_path(PNG_PNG_INCLUDE_DIR NAMES "libpng17/png.h")
691 find_library(PNG_LIBRARY NAMES png17 libpng17)
692 find_package(PackageHandleStandardArgs)
693 find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
695 include_directories(${PNG_PNG_INCLUDE_DIR})
698 file(GLOB PNG_ARM_INCLUDES native/ext/libpng17/arm/*)
700 add_library(png17 STATIC
701 native/ext/libpng17/pngconf.h
702 native/ext/libpng17/pngdebug.h
703 native/ext/libpng17/png.c
704 native/ext/libpng17/png.h
705 native/ext/libpng17/pngerror.c
706 native/ext/libpng17/pngget.c
707 native/ext/libpng17/pnginfo.h
708 native/ext/libpng17/pnglibconf.h
709 native/ext/libpng17/pngmem.c
710 native/ext/libpng17/pngpread.c
711 native/ext/libpng17/pngpriv.h
712 native/ext/libpng17/pngread.c
713 native/ext/libpng17/pngrio.c
714 native/ext/libpng17/pngrtran.c
715 native/ext/libpng17/pngrutil.c
716 native/ext/libpng17/pngset.c
717 native/ext/libpng17/pngstruct.h
718 native/ext/libpng17/pngtest.c
719 native/ext/libpng17/pngtrans.c
720 native/ext/libpng17/pngwio.c
721 native/ext/libpng17/pngwrite.c
722 native/ext/libpng17/pngwtran.c
723 native/ext/libpng17/pngwutil.c
724 ${PNG_ARM_INCLUDES} )
725 set(PNG_LIBRARY png17)
726 include_directories(native/ext)
734 set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a8")
736 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
737 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
738 set (CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=armv7-a -mfpu=neon -mcpu=cortex-a9")
740 set(nativeExtra ${nativeExtra}
741 native/math/fast/fast_matrix_neon.S)
744 set(nativeExtra ${nativeExtra}
745 native/math/fast/fast_matrix_sse.c)
750 set(nativeExtra ${nativeExtra}
751 native/base/NativeApp.h
752 native/android/app-android.cpp
753 native/android/native_audio.cpp
754 native/android/native_audio.h)
756 add_library(native_audio SHARED
757 native/android/native-audio-so.cpp
758 native/android/native-audio-so.h)
759 target_link_libraries(native_audio OpenSLES log)
762 set(nativeExtra ${nativeExtra}
766 ios/ViewController.mm
770 ios/iCade/iCadeReaderView.h
771 ios/iCade/iCadeReaderView.m
772 ios/iCade/iCadeState.h)
773 set(nativeExtraLibs ${nativeExtraLibs} "-framework Foundation -framework AudioToolbox -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework UIKit -framework GLKit -framework OpenAL")
774 if(EXISTS "${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks/GameController.framework")
775 set(nativeExtraLibs ${nativeExtraLibs} "-weak_framework GameController")
778 set_source_files_properties(ios/AppDelegate.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
779 set_source_files_properties(ios/ViewController.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
781 set(TargetBin PPSSPP)
784 message(FATAL_ERROR "Cmake does not yet support Qt. Please use qmake instead.")
785 find_package(Qt4 COMPONENTS QtMultimedia QtOpenGL QtGui QtCore)
786 include(${QT_USE_FILE})
787 qt4_wrap_cpp(nativeQtHeader native/base/QtMain.h)
788 set(nativeExtra ${nativeExtra} native/base/QtMain.cpp ${nativeQtHeader})
789 if(NOT MOBILE_DEVICE)
790 qt4_wrap_cpp(nativeQtHeader Qt/mainwindow.h)
791 set(nativeExtra ${nativeExtra} Qt/mainwindow.cpp)
793 set(nativeExtraLibs ${nativeExtraLibs} ${QT_LIBRARIES})
794 set(TargetBin PPSSPPQt)
796 set(nativeExtraLibs ${nativeExtraLibs} "-framework CoreFoundation")
800 set(nativeExtra ${nativeExtra} native/base/BlackberryMain.cpp native/base/BlackberryDisplay.cpp)
801 set(nativeExtraLibs ${nativeExtraLibs} OpenAL bps screen socket EGL)
802 set(TargetBin PPSSPPBlackberry)
804 set(TargetBin PPSSPPSDL)
806 include_directories(${SDL2_INCLUDE_DIR})
807 add_definitions(-DSDL)
808 set(nativeExtra ${nativeExtra}
811 native/base/PCMain.cpp)
812 set(nativeExtraLibs ${nativeExtraLibs} ${SDL2_LIBRARY})
814 set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm)
815 set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY})
817 set(nativeExtraLibs ${nativeExtraLibs} pthread EGL)
819 set(TargetBin PPSSPPSDL)
821 message(FATAL_ERROR "Could not find SDL2. Failing.")
825 android/jni/TestRunner.cpp
827 UI/BackgroundAudio.cpp
835 UI/GameSettingsScreen.cpp
836 UI/TiltAnalogSettingsScreen.cpp
837 UI/TiltEventProcessor.cpp
838 UI/TouchControlLayoutScreen.cpp
839 UI/TouchControlVisibilityScreen.cpp
841 UI/OnScreenDisplay.cpp
842 UI/ControlMappingScreen.cpp
844 UI/SavedataScreen.cpp
847 UI/InstallZipScreen.cpp
851 set(NativeAppSource ${NativeAppSource} android/jni/ArmEmitterTest.cpp)
853 set(nativeExtra ${nativeExtra} ${NativeAppSource})
856 add_library(native STATIC
858 native/base/backtrace.cpp
859 native/base/backtrace.h
860 native/audio/mixer.cpp
862 native/audio/wav_read.cpp
863 native/audio/wav_read.h
864 native/base/basictypes.h
865 native/base/buffer.cpp
868 native/base/colorutil.cpp
869 native/base/colorutil.h
870 native/base/display.cpp
871 native/base/display.h
872 native/base/error_context.cpp
873 native/base/error_context.h
874 native/base/fastlist.h
875 native/base/fastlist_test.cpp
876 native/base/functional.h
877 native/base/linked_ptr.h
878 native/base/logging.h
880 native/base/scoped_ptr.h
882 native/base/stringutil.cpp
883 native/base/stringutil.h
884 native/base/timeutil.cpp
885 native/base/timeutil.h
886 native/data/compression.cpp
887 native/data/compression.h
888 native/ext/vjson/json.cpp
889 native/ext/vjson/json.h
890 native/ext/vjson/block_allocator.cpp
891 native/ext/vjson/block_allocator.h
892 native/file/chunk_file.cpp
893 native/file/chunk_file.h
894 native/file/dialog.cpp
896 native/file/easy_file.cpp
897 native/file/easy_file.h
898 native/file/fd_util.cpp
899 native/file/fd_util.h
900 native/file/file_util.cpp
901 native/file/file_util.h
902 native/file/ini_file.cpp
903 native/file/ini_file.h
907 native/file/zip_read.cpp
908 native/file/zip_read.h
909 native/gfx/gl_common.h
910 native/gfx/gl_debug_log.cpp
911 native/gfx/gl_debug_log.h
912 native/gfx/gl_lost_manager.cpp
913 native/gfx/gl_lost_manager.h
914 native/gfx/texture.cpp
916 native/gfx/texture_atlas.cpp
917 native/gfx/texture_atlas.h
918 # native/gfx/texture_dx11.cpp
919 native/gfx/texture_gen.cpp
920 native/gfx/texture_gen.h
921 native/gfx_es2/draw_buffer.cpp
922 native/gfx_es2/draw_buffer.h
923 native/gfx_es2/draw_text.cpp
924 native/gfx_es2/draw_text.h
925 native/gfx_es2/fbo.cpp
927 native/gfx_es2/gl_state.cpp
928 native/gfx_es2/gl_state.h
929 native/gfx_es2/gpu_features.cpp
930 native/gfx_es2/gpu_features.h
931 native/gfx_es2/glsl_program.cpp
932 native/gfx_es2/glsl_program.h
933 native/gfx_es2/vertex_format.cpp
934 native/gfx_es2/vertex_format.h
935 native/gfx_es2/gl3stub.c
936 native/gfx_es2/gl3stub.h
939 native/image/png_load.cpp
940 native/image/png_load.h
941 native/image/zim_load.cpp
942 native/image/zim_load.h
943 native/image/zim_save.cpp
944 native/image/zim_save.h
945 native/input/gesture_detector.cpp
946 native/input/gesture_detector.h
947 native/input/keycodes.h
948 native/input/input_state.h
949 native/input/input_state.cpp
950 native/math/fast/fast_math.c
951 native/math/fast/fast_matrix.c
952 native/math/curves.cpp
954 native/math/expression_parser.cpp
955 native/math/expression_parser.h
956 native/math/lin/aabb.cpp
957 native/math/lin/aabb.h
958 native/math/lin/matrix4x4.cpp
959 native/math/lin/matrix4x4.h
960 native/math/lin/plane.cpp
961 native/math/lin/plane.h
962 native/math/lin/quat.cpp
963 native/math/lin/quat.h
964 native/math/lin/ray.h
965 native/math/lin/vec3.cpp
966 native/math/lin/vec3.h
967 native/math/math_util.cpp
968 native/math/math_util.h
969 native/net/http_client.cpp
970 native/net/http_client.h
971 native/net/resolve.cpp
975 native/profiler/profiler.cpp
976 native/profiler/profiler.h
977 native/thin3d/thin3d.cpp
978 native/thin3d/thin3d.h
979 native/thin3d/thin3d_gl.cpp
980 native/thread/prioritizedworkqueue.cpp
981 native/thread/prioritizedworkqueue.h
982 native/thread/threadutil.cpp
983 native/thread/threadutil.h
984 native/thread/threadpool.cpp
985 native/thread/threadpool.h
990 native/ui/ui_context.cpp
991 native/ui/ui_context.h
992 native/ui/ui_screen.cpp
993 native/ui/ui_screen.h
996 native/ui/viewgroup.cpp
997 native/ui/viewgroup.h
998 native/ui/virtual_input.cpp
999 native/ui/virtual_input.h
1000 native/util/bits/bits.cpp
1001 native/util/bits/bits.h
1002 native/util/bits/hamming.h
1003 native/util/bits/varint.cpp
1004 native/util/bits/varint.h
1005 native/util/hash/hash.cpp
1006 native/util/hash/hash.h
1007 native/util/random/perlin.cpp
1008 native/util/random/perlin.h
1009 native/util/random/rng.h
1010 native/util/text/utf8.h
1011 native/util/text/utf8.cpp
1012 native/util/text/parsers.h
1013 native/util/text/parsers.cpp
1014 native/util/const_map.h
1015 native/ext/jpge/jpgd.cpp
1016 native/ext/jpge/jpgd.h
1017 native/ext/jpge/jpge.cpp
1018 native/ext/jpge/jpge.h)
1019 include_directories(native)
1021 if (LINUX AND NOT ANDROID)
1025 target_link_libraries(native ${LIBZIP_LIBRARY} ${PNG_LIBRARY} rg_etc1 vjson stb_vorbis snappy udis86 ${RT_LIB} ${GLEW_LIBRARIES})
1028 target_link_libraries(native log EGL)
1030 target_link_libraries(native ws2_32 winmm)
1032 setup_target_project(native native)
1034 add_library(kirk STATIC
1037 ext/libkirk/amctrl.c
1038 ext/libkirk/amctrl.h
1043 ext/libkirk/kirk_engine.c
1044 ext/libkirk/kirk_engine.h)
1045 include_directories(ext/libkirk)
1047 add_library(sfmt19937 STATIC
1048 ext/sfmt19937/SFMT.c
1049 ext/sfmt19937/SFMT.h
1050 ext/sfmt19937/SFMT-common.h
1051 ext/sfmt19937/SFMT-params.h
1052 ext/sfmt19937/SFMT-params19937.h
1054 include_directories(ext/sfmt19937)
1056 add_library(xbrz STATIC
1060 include_directories(ext/xbrz)
1062 add_library(xxhash STATIC
1066 include_directories(ext/xxhash)
1071 set(CoreExtra ${CoreExtra}
1072 Core/MIPS/ARM/ArmAsm.cpp
1073 Core/MIPS/ARM/ArmAsm.h
1074 Core/MIPS/ARM/ArmCompALU.cpp
1075 Core/MIPS/ARM/ArmCompBranch.cpp
1076 Core/MIPS/ARM/ArmCompFPU.cpp
1077 Core/MIPS/ARM/ArmCompLoadStore.cpp
1078 Core/MIPS/ARM/ArmCompVFPU.cpp
1079 Core/MIPS/ARM/ArmCompVFPUNEON.cpp
1080 Core/MIPS/ARM/ArmCompVFPUNEONUtil.cpp
1081 Core/MIPS/ARM/ArmCompReplace.cpp
1082 Core/MIPS/ARM/ArmJit.cpp
1083 Core/MIPS/ARM/ArmJit.h
1084 Core/MIPS/ARM/ArmRegCache.cpp
1085 Core/MIPS/ARM/ArmRegCache.h
1086 Core/MIPS/ARM/ArmRegCacheFPU.cpp
1087 Core/MIPS/ARM/ArmRegCacheFPU.h
1088 GPU/Common/VertexDecoderArm.cpp
1091 set(CoreExtra ${CoreExtra}
1092 Core/MIPS/ARM64/Arm64Asm.cpp
1093 Core/MIPS/ARM64/Arm64Asm.h
1094 Core/MIPS/ARM64/Arm64CompALU.cpp
1095 Core/MIPS/ARM64/Arm64CompBranch.cpp
1096 Core/MIPS/ARM64/Arm64CompFPU.cpp
1097 Core/MIPS/ARM64/Arm64CompLoadStore.cpp
1098 Core/MIPS/ARM64/Arm64CompVFPU.cpp
1099 Core/MIPS/ARM64/Arm64CompReplace.cpp
1100 Core/MIPS/ARM64/Arm64Jit.cpp
1101 Core/MIPS/ARM64/Arm64Jit.h
1102 Core/MIPS/ARM64/Arm64RegCache.cpp
1103 Core/MIPS/ARM64/Arm64RegCache.h
1104 Core/MIPS/ARM64/Arm64RegCacheFPU.cpp
1105 Core/MIPS/ARM64/Arm64RegCacheFPU.h
1106 GPU/Common/VertexDecoderArm.cpp
1107 Core/Util/DisArm64.cpp)
1109 set(CoreExtra ${CoreExtra}
1110 Core/MIPS/x86/Asm.cpp
1112 Core/MIPS/x86/CompALU.cpp
1113 Core/MIPS/x86/CompBranch.cpp
1114 Core/MIPS/x86/CompFPU.cpp
1115 Core/MIPS/x86/CompLoadStore.cpp
1116 Core/MIPS/x86/CompVFPU.cpp
1117 Core/MIPS/x86/CompReplace.cpp
1118 Core/MIPS/x86/Jit.cpp
1120 Core/MIPS/x86/JitSafeMem.cpp
1121 Core/MIPS/x86/JitSafeMem.h
1122 Core/MIPS/x86/RegCache.cpp
1123 Core/MIPS/x86/RegCache.h
1124 Core/MIPS/x86/RegCacheFPU.cpp
1125 Core/MIPS/x86/RegCacheFPU.h
1126 GPU/Common/VertexDecoderX86.cpp
1129 set(CoreExtra ${CoreExtra}
1130 Core/MIPS/MIPS/MipsJit.cpp
1131 Core/MIPS/MIPS/MipsJit.h
1132 GPU/Common/VertexDecoderFake.cpp
1135 set(CoreExtra ${CoreExtra}
1136 Core/MIPS/fake/FakeJit.cpp
1137 Core/MIPS/fake/FakeJit.h
1138 GPU/Common/VertexDecoderFake.cpp
1143 set(CORE_NEON Core/Util/AudioFormatNEON.cpp Core/Util/AudioFormatNEON.h)
1146 # 'ppsspp_jni' on ANDROID, 'Core' everywhere else
1147 # SHARED on ANDROID, STATIC everywhere else
1148 add_library(${CoreLibName} ${CoreLinkType}
1154 Core/CoreParameter.h
1161 Core/ThreadEventQueue.h
1162 Core/Debugger/Breakpoints.cpp
1163 Core/Debugger/Breakpoints.h
1164 Core/Debugger/DebugInterface.h
1165 Core/Debugger/SymbolMap.cpp
1166 Core/Debugger/SymbolMap.h
1167 Core/Debugger/DisassemblyManager.cpp
1168 Core/Debugger/DisassemblyManager.h
1169 Core/Dialog/PSPDialog.cpp
1170 Core/Dialog/PSPDialog.h
1171 Core/Dialog/PSPGamedataInstallDialog.cpp
1172 Core/Dialog/PSPGamedataInstallDialog.h
1173 Core/Dialog/PSPMsgDialog.cpp
1174 Core/Dialog/PSPMsgDialog.h
1175 Core/Dialog/PSPNetconfDialog.cpp
1176 Core/Dialog/PSPNetconfDialog.h
1177 Core/Dialog/PSPOskDialog.cpp
1178 Core/Dialog/PSPOskDialog.h
1179 Core/Dialog/PSPPlaceholderDialog.cpp
1180 Core/Dialog/PSPPlaceholderDialog.h
1181 Core/Dialog/PSPSaveDialog.cpp
1182 Core/Dialog/PSPSaveDialog.h
1183 Core/Dialog/PSPScreenshotDialog.cpp
1184 Core/Dialog/PSPScreenshotDialog.h
1185 Core/Dialog/SavedataParam.cpp
1186 Core/Dialog/SavedataParam.h
1187 Core/ELF/ElfReader.cpp
1188 Core/ELF/ElfReader.h
1190 Core/ELF/PBPReader.cpp
1191 Core/ELF/PBPReader.h
1192 Core/ELF/PrxDecrypter.cpp
1193 Core/ELF/PrxDecrypter.h
1194 Core/ELF/ParamSFO.cpp
1196 Core/FileSystems/tlzrc.cpp
1197 Core/FileSystems/BlockDevices.cpp
1198 Core/FileSystems/BlockDevices.h
1199 Core/FileSystems/DirectoryFileSystem.cpp
1200 Core/FileSystems/DirectoryFileSystem.h
1201 Core/FileSystems/FileSystem.h
1202 Core/FileSystems/FileSystem.cpp
1203 Core/FileSystems/ISOFileSystem.cpp
1204 Core/FileSystems/ISOFileSystem.h
1205 Core/FileSystems/MetaFileSystem.cpp
1206 Core/FileSystems/MetaFileSystem.h
1207 Core/FileSystems/VirtualDiscFileSystem.cpp
1208 Core/FileSystems/VirtualDiscFileSystem.h
1211 Core/HLE/FunctionWrappers.h
1214 Core/HLE/ReplaceTables.cpp
1215 Core/HLE/ReplaceTables.h
1216 Core/HLE/HLEHelperThread.cpp
1217 Core/HLE/HLEHelperThread.h
1218 Core/HLE/HLETables.cpp
1219 Core/HLE/HLETables.h
1220 Core/HLE/KernelWaitHelpers.h
1221 Core/HLE/__sceAudio.cpp
1222 Core/HLE/__sceAudio.h
1223 Core/HLE/sceAdler.cpp
1225 Core/HLE/sceAtrac.cpp
1227 Core/HLE/sceAudio.cpp
1228 Core/HLE/sceAudiocodec.cpp
1229 Core/HLE/sceAudiocodec.h
1230 Core/HLE/sceAudioRouting.cpp
1231 Core/HLE/sceAudioRouting.h
1235 Core/HLE/sceChnnlsv.cpp
1236 Core/HLE/sceChnnlsv.h
1237 Core/HLE/sceCtrl.cpp
1239 Core/HLE/sceDeflt.cpp
1241 Core/HLE/sceDisplay.cpp
1242 Core/HLE/sceDisplay.h
1243 Core/HLE/sceDmac.cpp
1245 Core/HLE/sceG729.cpp
1247 Core/HLE/sceGameUpdate.cpp
1248 Core/HLE/sceGameUpdate.h
1251 Core/HLE/sceFont.cpp
1253 Core/HLE/sceHeap.cpp
1255 Core/HLE/sceHprm.cpp
1257 Core/HLE/sceHttp.cpp
1259 Core/HLE/sceImpose.cpp
1260 Core/HLE/sceImpose.h
1263 Core/HLE/sceJpeg.cpp
1265 Core/HLE/sceKernel.cpp
1266 Core/HLE/sceKernel.h
1267 Core/HLE/sceKernelAlarm.cpp
1268 Core/HLE/sceKernelAlarm.h
1269 Core/HLE/sceKernelEventFlag.cpp
1270 Core/HLE/sceKernelEventFlag.h
1271 Core/HLE/sceKernelInterrupt.cpp
1272 Core/HLE/sceKernelInterrupt.h
1273 Core/HLE/sceKernelMbx.cpp
1274 Core/HLE/sceKernelMbx.h
1275 Core/HLE/sceKernelMemory.cpp
1276 Core/HLE/sceKernelMemory.h
1277 Core/HLE/sceKernelModule.cpp
1278 Core/HLE/sceKernelModule.h
1279 Core/HLE/sceKernelMsgPipe.cpp
1280 Core/HLE/sceKernelMsgPipe.h
1281 Core/HLE/sceKernelMutex.cpp
1282 Core/HLE/sceKernelMutex.h
1283 Core/HLE/sceKernelSemaphore.cpp
1284 Core/HLE/sceKernelSemaphore.h
1285 Core/HLE/sceKernelThread.cpp
1286 Core/HLE/sceKernelThread.h
1287 Core/HLE/sceKernelTime.cpp
1288 Core/HLE/sceKernelTime.h
1289 Core/HLE/sceKernelVTimer.cpp
1290 Core/HLE/sceKernelVTimer.h
1291 Core/HLE/sceMpeg.cpp
1295 Core/HLE/sceNetAdhoc.cpp
1296 Core/HLE/sceNetAdhoc.h
1298 Core/HLE/proAdhoc.cpp
1299 Core/HLE/proAdhocServer.h
1300 Core/HLE/proAdhocServer.cpp
1301 Core/HLE/sceOpenPSID.cpp
1302 Core/HLE/sceOpenPSID.h
1303 Core/HLE/sceP3da.cpp
1305 Core/HLE/sceMt19937.cpp
1306 Core/HLE/sceMt19937.h
1313 Core/HLE/sceParseHttp.cpp
1314 Core/HLE/sceParseHttp.h
1315 Core/HLE/sceParseUri.cpp
1316 Core/HLE/sceParseUri.h
1317 Core/HLE/scePower.cpp
1319 Core/HLE/scePsmf.cpp
1325 Core/HLE/sceSfmt19937.cpp
1326 Core/HLE/sceSfmt19937.h
1327 Core/HLE/sceSha256.cpp
1328 Core/HLE/sceSha256.h
1335 Core/HLE/sceUsbGps.cpp
1336 Core/HLE/sceUsbGps.h
1337 Core/HLE/sceUtility.cpp
1338 Core/HLE/sceUtility.h
1339 Core/HLE/sceVaudio.cpp
1340 Core/HLE/sceVaudio.h
1341 Core/HLE/scePspNpDrm_user.cpp
1342 Core/HLE/scePspNpDrm_user.h
1345 Core/HLE/scePauth.cpp
1347 Core/HW/SimpleAudioDec.cpp
1348 Core/HW/SimpleAudioDec.h
1349 Core/HW/AsyncIOManager.cpp
1350 Core/HW/AsyncIOManager.h
1351 Core/HW/MediaEngine.cpp
1352 Core/HW/MediaEngine.h
1353 Core/HW/MpegDemux.cpp
1355 Core/HW/MemoryStick.cpp
1356 Core/HW/MemoryStick.h
1357 Core/HW/SasAudio.cpp
1359 Core/HW/StereoResampler.cpp
1360 Core/HW/StereoResampler.h
1365 Core/MIPS/JitCommon/JitCommon.cpp
1366 Core/MIPS/JitCommon/JitCommon.h
1367 Core/MIPS/JitCommon/NativeJit.h
1368 Core/MIPS/JitCommon/JitBlockCache.cpp
1369 Core/MIPS/JitCommon/JitBlockCache.h
1370 Core/MIPS/JitCommon/JitState.cpp
1371 Core/MIPS/JitCommon/JitState.h
1374 Core/MIPS/MIPSAnalyst.cpp
1375 Core/MIPS/MIPSAnalyst.h
1376 Core/MIPS/MIPSCodeUtils.cpp
1377 Core/MIPS/MIPSCodeUtils.h
1378 Core/MIPS/MIPSDebugInterface.cpp
1379 Core/MIPS/MIPSDebugInterface.h
1380 Core/MIPS/MIPSDis.cpp
1382 Core/MIPS/MIPSDisVFPU.cpp
1383 Core/MIPS/MIPSDisVFPU.h
1384 Core/MIPS/MIPSInt.cpp
1386 Core/MIPS/MIPSIntVFPU.cpp
1387 Core/MIPS/MIPSIntVFPU.h
1388 Core/MIPS/MIPSStackWalk.cpp
1389 Core/MIPS/MIPSStackWalk.h
1390 Core/MIPS/MIPSTables.cpp
1391 Core/MIPS/MIPSTables.h
1392 Core/MIPS/MIPSVFPUUtils.cpp
1393 Core/MIPS/MIPSVFPUUtils.h
1394 Core/MIPS/MIPSAsm.cpp
1398 Core/MemMapFunctions.cpp
1399 Core/MemMapHelpers.h
1410 Core/Util/AudioFormat.cpp
1411 Core/Util/AudioFormat.h
1412 Core/Util/GameManager.cpp
1413 Core/Util/GameManager.h
1414 Core/Util/BlockAllocator.cpp
1415 Core/Util/BlockAllocator.h
1416 Core/Util/PPGeDraw.cpp
1417 Core/Util/PPGeDraw.h
1418 Core/Util/ppge_atlas.cpp
1419 Core/Util/ppge_atlas.h
1421 $<TARGET_OBJECTS:GPU>
1424 target_link_libraries(${CoreLibName} Common native kirk cityhash sfmt19937 xbrz xxhash
1425 ${CoreExtraLibs} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES} ${X11_LIBRARIES} ${CMAKE_DL_LIBS})
1426 setup_target_project(${CoreLibName} Core)
1428 # Generate git-version.cpp at build time.
1429 add_custom_target(GitVersion ALL
1430 DEPENDS something_that_never_exists)
1431 add_custom_command(OUTPUT something_that_never_exists
1432 COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
1433 -P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake)
1435 set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp
1436 PROPERTIES GENERATED TRUE)
1437 add_dependencies(${CoreLibName} GitVersion)
1440 set(GPU_NEON GPU/Common/TextureDecoderNEON.cpp)
1442 add_library(GPU OBJECT
1443 GPU/Common/DepalettizeShaderCommon.cpp
1444 GPU/Common/DepalettizeShaderCommon.h
1445 GPU/Common/FramebufferCommon.cpp
1446 GPU/Common/FramebufferCommon.h
1447 GPU/Common/GPUDebugInterface.h
1448 GPU/Common/DrawEngineCommon.cpp
1449 GPU/Common/DrawEngineCommon.h
1450 GPU/Common/SplineCommon.cpp
1451 GPU/Common/SplineCommon.h
1452 GPU/Common/SoftwareTransformCommon.cpp
1453 GPU/Common/SoftwareTransformCommon.h
1454 GPU/Common/VertexDecoderCommon.cpp
1455 GPU/Common/VertexDecoderCommon.h
1456 GPU/Common/TransformCommon.cpp
1457 GPU/Common/TransformCommon.h
1458 GPU/Common/IndexGenerator.cpp
1459 GPU/Common/IndexGenerator.h
1460 GPU/Common/TextureDecoder.cpp
1461 GPU/Common/TextureDecoder.h
1462 GPU/Common/TextureCacheCommon.cpp
1463 GPU/Common/TextureCacheCommon.h
1464 GPU/Common/TextureScalerCommon.cpp
1465 GPU/Common/TextureScalerCommon.h
1467 GPU/Common/PostShader.cpp
1468 GPU/Common/PostShader.h
1469 GPU/Common/SplineCommon.h
1470 GPU/Debugger/Breakpoints.cpp
1471 GPU/Debugger/Breakpoints.h
1472 GPU/Debugger/Stepping.cpp
1473 GPU/Debugger/Stepping.h
1474 GPU/GLES/DepalettizeShader.cpp
1475 GPU/GLES/DepalettizeShader.h
1476 GPU/GLES/GLES_GPU.cpp
1478 GPU/GLES/FragmentShaderGenerator.cpp
1479 GPU/GLES/FragmentShaderGenerator.h
1480 GPU/GLES/FragmentTestCache.cpp
1481 GPU/GLES/FragmentTestCache.h
1482 GPU/GLES/Framebuffer.cpp
1483 GPU/GLES/Framebuffer.h
1484 GPU/GLES/ShaderManager.cpp
1485 GPU/GLES/ShaderManager.h
1486 GPU/GLES/StateMapping.cpp
1487 GPU/GLES/StateMapping.h
1488 GPU/GLES/StencilBuffer.cpp
1489 GPU/GLES/TextureCache.cpp
1490 GPU/GLES/TextureCache.h
1491 GPU/GLES/TextureScaler.cpp
1492 GPU/GLES/TextureScaler.h
1493 GPU/GLES/TransformPipeline.cpp
1494 GPU/GLES/TransformPipeline.h
1495 GPU/GLES/VertexShaderGenerator.cpp
1496 GPU/GLES/VertexShaderGenerator.h
1506 GPU/Null/NullGpu.cpp
1508 GPU/Software/Clipper.cpp
1509 GPU/Software/Clipper.h
1510 GPU/Software/Lighting.cpp
1511 GPU/Software/Lighting.h
1512 GPU/Software/Rasterizer.cpp
1513 GPU/Software/Rasterizer.h
1514 GPU/Software/SoftGpu.cpp
1515 GPU/Software/SoftGpu.h
1516 GPU/Software/TransformUnit.cpp
1517 GPU/Software/TransformUnit.h
1519 setup_target_project(GPU GPU)
1522 add_executable(PPSSPPWindows WIN32
1523 Windows/Breakpoints.h
1524 Windows/DSoundStream.cpp
1525 Windows/DSoundStream.h
1526 Windows/Debugger/CPURegsInterface.h
1527 Windows/Debugger/BreakpointWindow.cpp
1528 Windows/Debugger/BreakpointWindow.h
1529 Windows/Debugger/CtrlDisAsmView.cpp
1530 Windows/Debugger/CtrlDisAsmView.h
1531 Windows/Debugger/CtrlMemView.cpp
1532 Windows/Debugger/CtrlMemView.h
1533 Windows/Debugger/CtrlRegisterList.cpp
1534 Windows/Debugger/CtrlRegisterList.h
1535 Windows/Debugger/Debugger.h
1536 Windows/Debugger/DebuggerShared.cpp
1537 Windows/Debugger/DebuggerShared.h
1538 Windows/Debugger/Debugger_Disasm.cpp
1539 Windows/Debugger/Debugger_Disasm.h
1540 Windows/Debugger/Debugger_MemoryDlg.cpp
1541 Windows/Debugger/Debugger_MemoryDlg.h
1542 Windows/Debugger/Debugger_Lists.cpp
1543 Windows/Debugger/Debugger_Lists.h
1544 Windows/Debugger/Debugger_Misc.cpp
1545 Windows/Debugger/Debugger_Misc.h
1546 # Windows/Debugger/Debugger_Profiler.cpp
1547 # Windows/Debugger/Debugger_Profiler.h
1548 Windows/Debugger/Debugger_SymbolMap.h
1549 Windows/Debugger/Debugger_VFPUDlg.cpp
1550 Windows/Debugger/Debugger_VFPUDlg.h
1551 Windows/Debugger/SimpleELF.h
1552 # Windows/DlgDynaView.cpp
1553 # Windows/DlgDynaView.h
1554 Windows/EmuThread.cpp
1557 Windows/InputBox.cpp
1559 Windows/InputDevice.cpp
1560 Windows/InputDevice.h
1561 Windows/KeyboardDevice.cpp
1562 Windows/KeyboardDevice.h
1563 Windows/MIPSCompALU.h
1564 Windows/MIPSCompBranch.h
1565 Windows/OpenGLBase.cpp
1566 Windows/OpenGLBase.h
1567 Windows/W32Util/DialogManager.cpp
1568 Windows/W32Util/DialogManager.h
1569 Windows/W32Util/Misc.cpp
1570 Windows/W32Util/Misc.h
1571 Windows/W32Util/PropertySheet.cpp
1572 Windows/W32Util/PropertySheet.h
1573 Windows/W32Util/ShellUtil.cpp
1574 Windows/W32Util/ShellUtil.h
1575 Windows/W32Util/XPTheme.h
1576 Windows/WindowsFileSystem.h
1577 Windows/WindowsHost.cpp
1578 Windows/WindowsHost.h
1579 Windows/WndMainWindow.cpp
1580 Windows/WndMainWindow.h
1582 Windows/XinputDevice.cpp
1583 Windows/XinputDevice.h
1590 target_link_libraries(PPSSPPWindows ${CoreLibName}
1591 kernel32 user32 gdi32 shell32 comctl32 dsound xinput)
1592 setup_target_project(PPSSPPWindows Windows)
1596 android/assets/ui_atlas.zim
1598 assets/ppge_atlas.zim
1599 assets/langregion.ini
1601 set(LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT} ${nativeExtraLibs})
1605 add_executable(PPSSPPHeadless
1606 headless/Headless.cpp
1607 UI/OnScreenDisplay.cpp
1609 headless/Compare.cpp
1611 target_link_libraries(PPSSPPHeadless
1612 ${COCOA_LIBRARY} ${LinkCommon})
1613 setup_target_project(PPSSPPHeadless headless)
1617 add_executable(unitTest
1618 unittest/UnitTest.cpp
1619 unittest/TestArmEmitter.cpp
1620 unittest/TestArm64Emitter.cpp
1621 unittest/TestX64Emitter.cpp
1622 unittest/JitHarness.cpp
1623 Core/MIPS/ARM/ArmRegCache.cpp
1624 Core/MIPS/ARM/ArmRegCacheFPU.cpp
1625 UI/OnScreenDisplay.cpp
1627 target_link_libraries(unitTest
1628 ${COCOA_LIBRARY} ${LinkCommon} Common)
1629 setup_target_project(unitTest unittest)
1634 if (APPLE AND NOT IOS)
1635 set(ICON_PATH_ABS ${CMAKE_CURRENT_SOURCE_DIR}/assets/ppsspp.icns)
1636 set( MACOSX_BUNDLE_ICON_FILE ppsspp.icns )
1637 set_source_files_properties(${ICON_PATH_ABS} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
1640 # TODO: there must a native way to copy these.
1641 # Now this is very prone to errors when changes occur.
1642 # Also better to have assets under Resources dir for OS X.
1643 file(GLOB_RECURSE FLASH0_FILES flash0/*)
1644 file(GLOB_RECURSE LANG_FILES lang/*)
1645 file(GLOB_RECURSE SHADER_FILES assets/shaders/*)
1647 if (APPLE AND NOT IOS)
1648 set_source_files_properties(${NativeAssets} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets")
1649 set_source_files_properties(${FLASH0_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets/flash0/font")
1650 set_source_files_properties(${LANG_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets/lang")
1651 set_source_files_properties(${SHADER_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION "MacOS/assets/shaders")
1654 add_executable(${TargetBin} MACOSX_BUNDLE ${ICON_PATH_ABS} ${NativeAssets} ${SHADER_FILES} ${FLASH0_FILES} ${LANG_FILES} ${NativeAppSource})
1656 add_executable(${TargetBin} ${NativeAppSource})
1658 target_link_libraries(${TargetBin} ${LinkCommon} Common)
1662 file(INSTALL ${NativeAssets} DESTINATION assets)
1663 file(INSTALL flash0 lang DESTINATION assets)
1665 if(APPLE AND NOT IOS)
1666 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -F /Library/Frameworks")
1669 # packaging and code signing
1671 add_dependencies(PPSSPP ${CoreLibName} GPU Common native)
1673 file(GLOB IOSAssets ios/assets/*.png)
1674 file(INSTALL ${IOSAssets} DESTINATION assets)
1676 file(INSTALL pspautotests DESTINATION assets)
1678 set(RSRC_XIB_FILES assets/Icon@2x.png)
1679 set_source_files_properties(${RSRC_XIB_FILES}
1680 PROPERTIES MACOSX_PACKAGE_LOCATION Resources
1682 set(APP_DIR_NAME \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME})
1683 add_custom_command(TARGET PPSSPP POST_BUILD
1684 COMMAND tar -c -C . --exclude .DS_Store --exclude .git -H gnu assets | tar -x -C '${APP_DIR_NAME}'
1686 # Force Xcode to relink the binary.
1687 add_custom_command(TARGET Core PRE_BUILD
1688 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
1689 COMMAND rm -f PPSSPP.build/{Debug,Release,MinSizeRel,RelWithDebInfo}-iphoneos/PPSSPP.build/Objects-normal/*/PPSSPP {Debug,Release,MinSizeRel,RelWithDebInfo}-iphoneos/PPSSPP.app/PPSSPP
1691 set_target_properties(${TargetBin} PROPERTIES
1692 MACOSX_BUNDLE_INFO_PLIST "../ios/PPSSPP-Info.plist"
1693 XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "iPhone/iPad"
1694 XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES