Qt UI in CMake (for future)

This commit is contained in:
Sacha 2012-12-16 21:17:13 +10:00
parent d6a08ba939
commit cfd7c6686b

View File

@ -18,7 +18,7 @@ if(BLACKBERRY)
set(ARM ON)
endif()
if (ARM)
if(ARM)
set(USING_GLES2 ON)
else() # Assume x86
set(X86 ON)
@ -37,6 +37,7 @@ option(ANDROID "Set to ON if targeting an Android device" ${ANDROID})
option(BLACKBERRY "Set to ON if targeting a Blackberry device" ${BLACKBERRY})
option(IOS "Set to ON if targeting an iOS device" ${IOS})
option(USING_GLES2 "Set to ON if target device uses OpenGL ES 2.0" ${USING_GLES2})
option(USING_QT_UI "Set to ON if you wish to use the Qt frontend wrapper" ${USING_QT_UI})
option(HEADLESS "Set to OFF to not generate the PPSSPPHeadless target" ${HEADLESS})
option(DEBUG "Set to ON to enable full debug logging" ${DEBUG})
@ -98,7 +99,7 @@ endif()
if(ARM)
add_definitions(-DARM)
endif()
if (USING_GLES2)
if(USING_GLES2)
add_definitions(-DUSING_GLES2)
endif()
@ -385,12 +386,20 @@ if(ANDROID)
native/android/native-audio-so.h)
target_link_libraries(native_audio OpenSLES)
# No target
elseif(USING_QT_UI)
# Currently unused
find_package(Qt4 COMPONENTS QtMultimedia QtOpenGL QtGui QtCore)
include(${QT_USE_FILE})
qt4_wrap_cpp(nativeQtHeader native/base/QtMain.h)
set(nativeExtra ${nativeExtra} native/base/QtMain.cpp ${nativeQtHeader})
set(nativeExtraLibs ${nativeExtraLibs} ${QT_LIBRARIES})
set(TargetBin PPSSPPQt)
elseif(BLACKBERRY)
set(nativeExtra ${nativeExtra} native/base/BlackberryMain.cpp)
set(nativeExtraLibs ${nativeExtraLibs} asound bps screen socket EGL)
set(TargetBin PPSSPPBlackberry)
elseif(SDL_FOUND)
# Require SDL
# Require SDL
include_directories(${SDL_INCLUDE_DIR})
set(nativeExtra ${nativeExtra} native/base/PCMain.cpp)
set(nativeExtraLibs ${nativeExtraLibs} ${SDL_LIBRARY})