add custom new variable fot Qt

openmw-38
sandstranger 9 years ago
parent b0b3192520
commit 238a5824be

@ -168,14 +168,23 @@ endif (ANDROID)
option(OPENGL_ES "enable opengl es support" FALSE )
option(USE_QT "Use Qt in building" TRUE )
if (NOT BUILD_LAUNCHER AND NOT BUILD_OPENCS)
set(USE_QT FALSE CACHE BOOL "disable Qt" FORCE )
else()
set(USE_QT TRUE CACHE BOOL "enable Qt" FORCE )
endif()
add_definitions (-DUSE_QT)
if (OPENGL_ES)
INCLUDE(cmake/FindOpenGLES.cmake)
find_package(OpenGLES)
add_definitions (-DOPENGL_ES)
INCLUDE_DIRECTORIES(${OPENGLES_INCLUDE_DIR})
endif (OPENGLES)
# Dependencies
if (NOT ANDROID)
if (USE_QT)
set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)")
message(STATUS "Using Qt${DESIRED_QT_VERSION}")
@ -220,7 +229,7 @@ IF(BOOST_STATIC)
set(Boost_USE_STATIC_LIBS ON)
endif()
if (NOT ANDROID)
if (USE_QT)
find_package(OpenSceneGraph 3.2.0 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgQt osgUtil osgFX)
else()
find_package(OpenSceneGraph 3.2.0 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX)

@ -155,35 +155,15 @@ if (ANDROID)
android
log
dl
MyGUIEngineStatic
BulletCollision
LinearMath
z
osg
osgDB
osgAnimation
osgText
osgUtil
osgShadow
${OPENSCENEGRAPH_LIBRARIES}
${OSG_PLUGINS}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
jpeg
gif
png
)
endif (ANDROID)
if (OPENGL_ES)
target_link_libraries(openmw
${OPENGLES_gl_LIBRARY}
)
endif (OPENGL_ES)
if (USE_SYSTEM_TINYXML)
target_link_libraries(openmw ${TINYXML_LIBRARIES})
endif()

@ -139,7 +139,7 @@ add_component_dir (version
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
)
if (NOT ANDROID)
if (USE_QT)
add_component_qt_dir (contentselector
model/modelitem model/esmfile
model/naturalsort model/contentmodel
@ -176,28 +176,12 @@ include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
if (NOT ANDROID)
target_link_libraries(components
${Boost_SYSTEM_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${OSG_LIBRARIES}
${OPENTHREADS_LIBRARIES}
${OSGPARTICLE_LIBRARIES}
${OSGUTIL_LIBRARIES}
${OSGDB_LIBRARIES}
${OSGVIEWER_LIBRARIES}
${OSGGA_LIBRARIES}
${OSGFX_LIBRARIES}
${OSGANIMATION_LIBRARIES}
${BULLET_LIBRARIES}
${SDL2_LIBRARY}
# For MyGUI platform
${OPENGL_gl_LIBRARY}
${MYGUI_LIBRARIES}
)
if (OPENGL_ES)
set(GL_LIB ${OPENGLES_gl_LIBRARY})
else()
set(GL_LIB ${OPENGL_gl_LIBRARY})
endif()
target_link_libraries(components
${Boost_SYSTEM_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
@ -215,16 +199,16 @@ else()
${BULLET_LIBRARIES}
${SDL2_LIBRARY}
# For MyGUI platform
${GL_LIB}
${MYGUI_LIBRARIES}
)
endif()
if (WIN32)
target_link_libraries(components
${Boost_LOCALE_LIBRARY})
endif()
if (NOT ANDROID)
if (USE_QT)
if (DESIRED_QT_VERSION MATCHES 4)
target_link_libraries(components
${QT_QTCORE_LIBRARY}

@ -224,9 +224,6 @@ namespace SDLUtil
if (mCursorMap.find(name) != mCursorMap.end())
return;
if (mCursorMap.find(name) != mCursorMap.end())
return;
osg::ref_ptr<osg::Image> decompressed = decompress(image, static_cast<float>(rotDegrees));
SDL_Surface* surf = SDLUtil::imageToSurface(decompressed, false);

Loading…
Cancel
Save