-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from hrydgard/master
- Loading branch information
Showing
223 changed files
with
13,989 additions
and
4,230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,12 +63,12 @@ else() | |
endif() | ||
|
||
#find_package(Qt5Widgets) | ||
if(USING_GLES2) | ||
if(USING_GLES2 AND NOT IOS) | ||
set(OPENGL_LIBRARIES GLESv2) | ||
else() | ||
elseif(NOT IOS) | ||
include(FindOpenGL REQUIRED) | ||
endif() | ||
if (NOT BLACKBERRY AND NOT ANDROID) | ||
if (NOT BLACKBERRY AND NOT ANDROID AND NOT IOS) | ||
include(FindSDL) | ||
endif() | ||
include(FindThreads) | ||
|
@@ -119,9 +119,8 @@ if(NOT MSVC) | |
add_definitions(-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1) | ||
add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64) | ||
endif() | ||
|
||
if(APPLE) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") | ||
if(IOS) | ||
add_definitions(-DGL_ETC1_RGB8_OES=0) | ||
endif() | ||
|
||
if(BLACKBERRY) | ||
|
@@ -133,6 +132,12 @@ if(NOT MSVC) | |
add_definitions(-msse2) | ||
endif() | ||
|
||
if(IOS) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++") | ||
elseif(APPLE) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") | ||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") | ||
endif() | ||
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7.0) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | ||
else() | ||
|
@@ -415,9 +420,8 @@ elseif(IOS) | |
ios/AppDelegate.h | ||
ios/ViewController.mm | ||
ios/ViewController.h) | ||
set(CMAKE_EXE_LINKER_FLAGS "-framework Foundation -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework UIKit") | ||
# No target | ||
# set(TargetBin PPSSPP) | ||
set(nativeExtraLibs ${nativeExtraLibs} "-framework Foundation -framework AudioToolbox -framework CoreGraphics -framework QuartzCore -framework OpenGLES -framework UIKit -framework GLKit") | ||
set(TargetBin PPSSPP) | ||
elseif(USING_QT_UI) | ||
# Currently unused | ||
find_package(Qt4 COMPONENTS QtMultimedia QtOpenGL QtGui QtCore) | ||
|
@@ -589,6 +593,8 @@ 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 | ||
|
@@ -613,6 +619,8 @@ if(ARM) | |
Core/MIPS/ARM/ArmJitCache.h | ||
Core/MIPS/ARM/ArmRegCache.cpp | ||
Core/MIPS/ARM/ArmRegCache.h | ||
Core/MIPS/ARM/ArmRegCacheFPU.cpp | ||
Core/MIPS/ARM/ArmRegCacheFPU.h | ||
ext/disarm.cpp) | ||
elseif(X86) | ||
set(CoreExtra ${CoreExtra} | ||
|
@@ -679,6 +687,8 @@ add_library(${CoreLibName} ${CoreLinkType} | |
Core/FileSystems/ISOFileSystem.h | ||
Core/FileSystems/MetaFileSystem.cpp | ||
Core/FileSystems/MetaFileSystem.h | ||
Core/Font/PGF.cpp | ||
Core/Font/PGF.h | ||
Core/HLE/FunctionWrappers.h | ||
Core/HLE/HLE.cpp | ||
Core/HLE/HLE.h | ||
|
@@ -764,6 +774,8 @@ add_library(${CoreLibName} ${CoreLinkType} | |
Core/HLE/sceUtility.h | ||
Core/HLE/sceVaudio.cpp | ||
Core/HLE/sceVaudio.h | ||
Core/HLE/scePspNpDrm_user.cpp | ||
Core/HLE/scePspNpDrm_user.h | ||
Core/HW/MediaEngine.cpp | ||
Core/HW/MediaEngine.h | ||
Core/HW/MemoryStick.cpp | ||
|
@@ -803,6 +815,8 @@ add_library(${CoreLibName} ${CoreLinkType} | |
Core/PSPLoaders.h | ||
Core/PSPMixer.cpp | ||
Core/PSPMixer.h | ||
Core/Reporting.cpp | ||
Core/Reporting.h | ||
Core/SaveState.cpp | ||
Core/SaveState.h | ||
Core/System.cpp | ||
|
@@ -811,15 +825,26 @@ add_library(${CoreLibName} ${CoreLinkType} | |
Core/Util/BlockAllocator.h | ||
Core/Util/PPGeDraw.cpp | ||
Core/Util/PPGeDraw.h | ||
Core/Util/Pool.h | ||
Core/Util/ppge_atlas.cpp | ||
Core/Util/ppge_atlas.h | ||
$<TARGET_OBJECTS:GPU> | ||
Globals.h) | ||
Globals.h | ||
git-version.cpp) | ||
target_link_libraries(${CoreLibName} Common native kirk cityhash | ||
${GLEW_LIBRARIES} ${OPENGL_LIBRARIES}) | ||
setup_target_project(${CoreLibName} Core) | ||
|
||
# Generate git-version.cpp at build time. | ||
add_custom_target(GitVersion ALL | ||
DEPENDS something_that_never_exists) | ||
add_custom_command(OUTPUT something_that_never_exists | ||
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} | ||
-P ${CMAKE_CURRENT_SOURCE_DIR}/git-version.cmake) | ||
|
||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/git-version.cpp | ||
PROPERTIES GENERATED TRUE) | ||
add_dependencies(${CoreLibName} GitVersion) | ||
|
||
add_library(GPU OBJECT | ||
GPU/GLES/DisplayListInterpreter.cpp | ||
GPU/GLES/DisplayListInterpreter.h | ||
|
@@ -950,15 +975,26 @@ set(NativeAssets | |
set(LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT} ${nativeExtraLibs}) | ||
|
||
if (TargetBin) | ||
add_executable(${TargetBin} ${NativeAppSource}) | ||
if (IOS) | ||
add_executable(${TargetBin} MACOSX_BUNDLE ${NativeAppSource}) | ||
else() | ||
add_executable(${TargetBin} ${NativeAppSource}) | ||
endif() | ||
target_link_libraries(${TargetBin} ${LinkCommon}) | ||
endif() | ||
|
||
# installs | ||
file(INSTALL ${NativeAssets} DESTINATION assets) | ||
|
||
# code signing | ||
# packaging and code signing | ||
if (IOS) | ||
set_target_properties(${NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST PPSSPP-Info.plist XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer: My Name") | ||
set(RSRC_XIB_FILES assets/[email protected]) | ||
SET_SOURCE_FILES_PROPERTIES(${RSRC_XIB_FILES} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) | ||
set(APP_DIR_NAME \${TARGET_BUILD_DIR}/\${FULL_PRODUCT_NAME}) | ||
add_custom_command(TARGET PPSSPP POST_BUILD | ||
COMMAND tar -c -C . --exclude .DS_Store --exclude .git -H `find assets` | tar -x -C ${APP_DIR_NAME} | ||
) | ||
set_target_properties(${TargetBin} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "../ios/PPSSPP-Info.plist" XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer: My Name") | ||
endif() | ||
|
||
#include(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.