Commit 211abf03 authored by Jussi Lindgren's avatar Jussi Lindgren

Build: Addressed Ogre/CEGUI Find problems on Fedora 21

parent b8c02436
......@@ -35,18 +35,18 @@ IF(WIN32)
ENDIF(WIN32)
IF(UNIX)
INCLUDE("FindThirdPartyPkgConfig")
pkg_check_modules(CEGUI CEGUI)
pkg_check_modules(OgreCEGUIRenderer CEGUI-OGRE)
# Assumes FindThirdPartyCEGUI_Check.cmake has been run
ENDIF(UNIX)
IF(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
MESSAGE(STATUS " Found CEGUI/OgreCEGUIRenderer...")
INCLUDE_DIRECTORIES(${CEGUI_INCLUDE_DIRS} ${OgreCEGUIRenderer_INCLUDE_DIRS})
ADD_DEFINITIONS(${CEGUI_CFLAGS} ${OgreCEGUIRenderer_CFLAGS})
ADD_DEFINITIONS(${CEGUI_CFLAGS_OTHERS} ${OgreCEGUIRenderer_CFLAGS_OTHERS})
# LINK_DIRECTORIES(${CEGUI_LIBRARY_DIRS} ${OgreCEGUIRenderer_LIBRARY_DIRS})
IF(UNIX)
FOREACH(CEGUI_LIB ${CEGUI_LIBRARIES} ${OgreCEGUIRenderer_LIBRARIES})
SET(CEGUI_LIB1 "CEGUI_LIB1-NOTFOUND")
FIND_LIBRARY(CEGUI_LIB1 NAMES ${CEGUI_LIB} PATHS ${CEGUI_LIBRARY_DIRS} ${CEGUI_LIBDIR} NO_DEFAULT_PATH)
......
......@@ -22,9 +22,21 @@ IF(WIN32)
ENDIF(WIN32)
IF(UNIX)
INCLUDE("FindThirdPartyPkgConfig")
INCLUDE("FindPkgConfig")
SET(CEGUI_FOUND "-NOTFOUND")
pkg_check_modules(CEGUI CEGUI)
IF(NOT CEGUI_FOUND)
# we have this mess as the cegui filenames & paths are different on Fedora 21 at least,
# and the include_dirs doesn't contain the CEGUI/ part ... I'd put that to the .h/.cpp IF the same path
# convention was the case on all platforms... but it is not
pkg_check_modules(CEGUI CEGUI-0)
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
ENDIF(NOT CEGUI_FOUND)
SET(OgreCEGUIRenderer_FOUND "-NOTFOUND")
pkg_check_modules(OgreCEGUIRenderer CEGUI-OGRE)
IF(NOT OgreCEGUIRenderer_FOUND)
pkg_check_modules(OgreCEGUIRenderer CEGUI-0-OGRE)
ENDIF(NOT OgreCEGUIRenderer_FOUND)
ENDIF(UNIX)
IF(CEGUI_FOUND AND OgreCEGUIRenderer_FOUND)
......
......@@ -57,7 +57,11 @@ IF(Ogre3D_FOUND AND OIS_FOUND)
ADD_DEFINITIONS(${OIS_CFLAGS_OTHERS} ${Ogre3D_CFLAGS_OTHERS})
# MESSAGE(STATUS "A ${OIS_CFLAGS} ${Ogre3D_CFLAGS} B ${OIS_CFLAGS_OTHERS} ${Ogre3D_CFLAGS_OTHERS} C ${Ogre3D_LIBRARIES_RELEASE} D ${Ogre3D_LIBRARIES_DEBUG}")
IF(UNIX)
IF(UNIX)
IF(Ogre3D_VERSION VERSION_EQUAL "1.9.0" OR Ogre3D_VERSION VERSION_GREATER "1.9.0")
SET(${Ogre3D_LIBRARIES} "${Ogre3_LIBRARIES};OgreOverlay")
ENDIF(Ogre3D_VERSION VERSION_EQUAL "1.9.0" OR Ogre3D_VERSION VERSION_GREATER "1.9.0")
FOREACH(Ogre3D_LIB ${Ogre3D_LIBRARIES} ${OIS_LIBRARIES})
SET(Ogre3D_LIB1 "Ogre3D_LIB1-NOTFOUND")
FIND_LIBRARY(Ogre3D_LIB1 NAMES ${Ogre3D_LIB} PATHS ${Ogre3D_LIBRARY_DIRS} ${Ogre3D_LIBDIR} NO_DEFAULT_PATH)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment