forked from teamnwah/openmw-tes3coop
add custom new variable fot Qt
This commit is contained in:
parent
b0b3192520
commit
238a5824be
4 changed files with 40 additions and 70 deletions
|
@ -168,14 +168,23 @@ endif (ANDROID)
|
||||||
|
|
||||||
option(OPENGL_ES "enable opengl es support" FALSE )
|
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)
|
if (OPENGL_ES)
|
||||||
INCLUDE(cmake/FindOpenGLES.cmake)
|
find_package(OpenGLES)
|
||||||
add_definitions (-DOPENGL_ES)
|
add_definitions (-DOPENGL_ES)
|
||||||
INCLUDE_DIRECTORIES(${OPENGLES_INCLUDE_DIR})
|
|
||||||
endif (OPENGLES)
|
endif (OPENGLES)
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
if (NOT ANDROID)
|
if (USE_QT)
|
||||||
set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)")
|
set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)")
|
||||||
message(STATUS "Using Qt${DESIRED_QT_VERSION}")
|
message(STATUS "Using Qt${DESIRED_QT_VERSION}")
|
||||||
|
|
||||||
|
@ -220,7 +229,7 @@ IF(BOOST_STATIC)
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT ANDROID)
|
if (USE_QT)
|
||||||
find_package(OpenSceneGraph 3.2.0 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgQt osgUtil osgFX)
|
find_package(OpenSceneGraph 3.2.0 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgQt osgUtil osgFX)
|
||||||
else()
|
else()
|
||||||
find_package(OpenSceneGraph 3.2.0 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX)
|
find_package(OpenSceneGraph 3.2.0 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX)
|
||||||
|
|
|
@ -155,35 +155,15 @@ if (ANDROID)
|
||||||
android
|
android
|
||||||
log
|
log
|
||||||
dl
|
dl
|
||||||
MyGUIEngineStatic
|
|
||||||
BulletCollision
|
|
||||||
LinearMath
|
|
||||||
z
|
z
|
||||||
osg
|
|
||||||
osgDB
|
|
||||||
osgAnimation
|
|
||||||
osgText
|
|
||||||
osgUtil
|
|
||||||
osgShadow
|
|
||||||
${OPENSCENEGRAPH_LIBRARIES}
|
${OPENSCENEGRAPH_LIBRARIES}
|
||||||
${OSG_PLUGINS}
|
${OSG_PLUGINS}
|
||||||
${Boost_SYSTEM_LIBRARY}
|
|
||||||
${Boost_THREAD_LIBRARY}
|
|
||||||
${Boost_FILESYSTEM_LIBRARY}
|
|
||||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
|
||||||
jpeg
|
jpeg
|
||||||
gif
|
gif
|
||||||
png
|
png
|
||||||
)
|
)
|
||||||
endif (ANDROID)
|
endif (ANDROID)
|
||||||
|
|
||||||
|
|
||||||
if (OPENGL_ES)
|
|
||||||
target_link_libraries(openmw
|
|
||||||
${OPENGLES_gl_LIBRARY}
|
|
||||||
)
|
|
||||||
endif (OPENGL_ES)
|
|
||||||
|
|
||||||
if (USE_SYSTEM_TINYXML)
|
if (USE_SYSTEM_TINYXML)
|
||||||
target_link_libraries(openmw ${TINYXML_LIBRARIES})
|
target_link_libraries(openmw ${TINYXML_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -139,7 +139,7 @@ add_component_dir (version
|
||||||
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT ANDROID)
|
if (USE_QT)
|
||||||
add_component_qt_dir (contentselector
|
add_component_qt_dir (contentselector
|
||||||
model/modelitem model/esmfile
|
model/modelitem model/esmfile
|
||||||
model/naturalsort model/contentmodel
|
model/naturalsort model/contentmodel
|
||||||
|
@ -176,55 +176,39 @@ include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
|
add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
|
||||||
|
|
||||||
if (NOT ANDROID)
|
if (OPENGL_ES)
|
||||||
target_link_libraries(components
|
set(GL_LIB ${OPENGLES_gl_LIBRARY})
|
||||||
${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}
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
target_link_libraries(components
|
set(GL_LIB ${OPENGL_gl_LIBRARY})
|
||||||
${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
|
|
||||||
${MYGUI_LIBRARIES}
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
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
|
||||||
|
${GL_LIB}
|
||||||
|
${MYGUI_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(components
|
target_link_libraries(components
|
||||||
${Boost_LOCALE_LIBRARY})
|
${Boost_LOCALE_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT ANDROID)
|
if (USE_QT)
|
||||||
if (DESIRED_QT_VERSION MATCHES 4)
|
if (DESIRED_QT_VERSION MATCHES 4)
|
||||||
target_link_libraries(components
|
target_link_libraries(components
|
||||||
${QT_QTCORE_LIBRARY}
|
${QT_QTCORE_LIBRARY}
|
||||||
|
|
|
@ -221,9 +221,6 @@ namespace SDLUtil
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (mCursorMap.find(name) != mCursorMap.end())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mCursorMap.find(name) != mCursorMap.end())
|
if (mCursorMap.find(name) != mCursorMap.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue