From 27afb91936672a836466da5b7a4cee32953e0cee Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 3 Jan 2017 19:03:51 +0800 Subject: [PATCH] RPI v3 patch #1 --- CMakeLists.txt | 3 ++- components/CMakeLists.txt | 24 ++++++++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e883c6d1..1260b60ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,7 +220,6 @@ endif() IF(BUILD_OPENMW OR BUILD_OPENCS) find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX) - include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}) set(USED_OSG_PLUGINS osgdb_bmp @@ -259,6 +258,8 @@ IF(BUILD_OPENMW OR BUILD_OPENCS) ENDIF(BUILD_OPENMW OR BUILD_OPENCS) +include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}) + set(BOOST_COMPONENTS system filesystem program_options) if(WIN32) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 6e19faa36..330125426 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -20,11 +20,13 @@ else (GIT_CHECKOUT) configure_file(${VERSION_IN_FILE} ${VERSION_FILE}) endif (GIT_CHECKOUT) -if (OPENGL_ES) - find_package(OpenGLES REQUIRED) -else() - find_package(OpenGL REQUIRED) -endif() +if(BUILD_OPENMW OR BUILD_OPENCS) + if (OPENGL_ES) + find_package(OpenGLES REQUIRED) + else() + find_package(OpenGL REQUIRED) + endif() +endif(BUILD_OPENMW OR BUILD_OPENCS) # source files @@ -215,11 +217,13 @@ include_directories(${Bullet_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR}) -if (OPENGL_ES) - set(GL_LIB ${OPENGLES_gl_LIBRARY}) -else() - set(GL_LIB ${OPENGL_gl_LIBRARY}) -endif() +if(BUILD_OPENMW OR BUILD_OPENCS) + if (OPENGL_ES) + set(GL_LIB ${OPENGLES_gl_LIBRARY}) + else() + set(GL_LIB ${OPENGL_gl_LIBRARY}) + endif() +endif(BUILD_OPENMW OR BUILD_OPENCS) target_link_libraries(components ${Boost_SYSTEM_LIBRARY}