CMake configuration tweaks

Make the PkgConfig search for OGRE libraries and headers happy when custom paths are set.
Check the uuid/uuid.h header is found.
actorid
Diggory Hardy 14 years ago
parent b6e7de6527
commit 39614c6813

@ -205,6 +205,8 @@ if (WIN32)
add_definitions(-DBOOST_ALL_NO_LIB)
else (WIN32)
set(PLATFORM_INCLUDE_DIR "")
find_path (UUID_INCLUDE_DIR uuid/uuid.h)
include_directories(${UUID_INCLUDE_DIR})
endif (WIN32)
if (MSVC10)
set(PLATFORM_INCLUDE_DIR "")
@ -217,13 +219,14 @@ find_package(Boost REQUIRED COMPONENTS system filesystem program_options thread)
find_package(OIS REQUIRED)
find_package(OpenAL REQUIRED)
include_directories("."
${OGRE_INCLUDE_DIR} ${OGRE_INCLUDE_DIR}/Ogre
${OGRE_INCLUDE_DIR} ${OGRE_INCLUDE_DIR}/Ogre ${OGRE_INCLUDE_DIR}/OGRE
${OIS_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
${PLATFORM_INCLUDE_DIR}
${CMAKE_HOME_DIRECTORY}/extern/caelum/include
${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/MyGUIEngine/include
${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/OgrePlatform/include
${OPENAL_INCLUDE_DIR}
${UUID_INCLUDE_DIR}
${LIBDIR}
)

@ -38,10 +38,13 @@ ENDIF (WIN32)
IF (UNIX AND NOT APPLE)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_SEARCH_MODULE(OGRE REQUIRED OGRE)
# Don't mark REQUIRED, but use PKG_CHECK_MODULES below (otherwise PkgConfig
# complains even if OGRE_* are set by hand).
PKG_SEARCH_MODULE(OGRE OGRE)
SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIRS})
SET(OGRE_LIB_DIR ${OGRE_LIBDIR})
SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
PKG_CHECK_MODULES(OGRE OGRE)
ENDIF (UNIX AND NOT APPLE)
IF (APPLE)

Loading…
Cancel
Save