Added needed cmake files and added a comment to clarify the changes in FindOgre.cmake

actorid
k1ll 13 years ago
parent b7eb7ff8e3
commit c5bbbee9c1

@ -0,0 +1,53 @@
#-------------------------------------------------------------------
# This file is part of the CMake build system for OGRE
# (Object-oriented Graphics Rendering Engine)
# For the latest info, see http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------
# - Try to find Cg
# Once done, this will define
#
# Cg_FOUND - system has Cg
# Cg_INCLUDE_DIRS - the Cg include directories
# Cg_LIBRARIES - link these to use Cg
include(FindPkgMacros)
findpkg_begin(Cg)
# Get path, convert backslashes as ${ENV_${var}}
getenv_path(Cg_HOME)
getenv_path(OGRE_SOURCE)
getenv_path(OGRE_HOME)
# construct search paths
set(Cg_PREFIX_PATH ${Cg_HOME} ${ENV_Cg_HOME}
${OGRE_SOURCE}/Dependencies
${ENV_OGRE_SOURCE}/Dependencies
${OGRE_HOME} ${ENV_OGRE_HOME}
/opt/nvidia-cg-toolkit)
create_search_paths(Cg)
# redo search if prefix path changed
clear_if_changed(Cg_PREFIX_PATH
Cg_LIBRARY_FWK
Cg_LIBRARY_REL
Cg_LIBRARY_DBG
Cg_INCLUDE_DIR
)
set(Cg_LIBRARY_NAMES Cg)
get_debug_names(Cg_LIBRARY_NAMES)
use_pkgconfig(Cg_PKGC Cg)
findpkg_framework(Cg)
find_path(Cg_INCLUDE_DIR NAMES cg.h HINTS ${Cg_FRAMEWORK_INCLUDES} ${Cg_INC_SEARCH_PATH} ${Cg_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Cg)
find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
make_library_set(Cg_LIBRARY)
findpkg_finish(Cg)
add_parent_dir(Cg_INCLUDE_DIRS Cg_INCLUDE_DIR)

@ -0,0 +1,47 @@
#-------------------------------------------------------------------
# This file is part of the CMake build system for OGRE
# (Object-oriented Graphics Rendering Engine)
# For the latest info, see http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------
# - Try to find FreeImage
# Once done, this will define
#
# FreeImage_FOUND - system has FreeImage
# FreeImage_INCLUDE_DIRS - the FreeImage include directories
# FreeImage_LIBRARIES - link these to use FreeImage
include(FindPkgMacros)
findpkg_begin(FreeImage)
# Get path, convert backslashes as ${ENV_${var}}
getenv_path(FREEIMAGE_HOME)
# construct search paths
set(FreeImage_PREFIX_PATH ${FREEIMAGE_HOME} ${ENV_FREEIMAGE_HOME})
create_search_paths(FreeImage)
# redo search if prefix path changed
clear_if_changed(FreeImage_PREFIX_PATH
FreeImage_LIBRARY_FWK
FreeImage_LIBRARY_REL
FreeImage_LIBRARY_DBG
FreeImage_INCLUDE_DIR
)
set(FreeImage_LIBRARY_NAMES freeimage)
get_debug_names(FreeImage_LIBRARY_NAMES)
use_pkgconfig(FreeImage_PKGC freeimage)
findpkg_framework(FreeImage)
find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_PATH} ${FreeImage_PKGC_INCLUDE_DIRS})
find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
make_library_set(FreeImage_LIBRARY)
findpkg_finish(FreeImage)

@ -258,6 +258,7 @@ if (OGRE_STATIC)
endif ()
endif ()
#Removed FWK because it normally is unnecessary and would break the build when not available
#set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${OGRE_LIBRARY_FWK} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES}
# ${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES}
# ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB}

@ -0,0 +1,48 @@
#-------------------------------------------------------------------
# This file is part of the CMake build system for OGRE
# (Object-oriented Graphics Rendering Engine)
# For the latest info, see http://www.ogre3d.org/
#
# The contents of this file are placed in the public domain. Feel
# free to make use of it in any way you like.
#-------------------------------------------------------------------
# - Try to find zziplib
# Once done, this will define
#
# ZZip_FOUND - system has ZZip
# ZZip_INCLUDE_DIRS - the ZZip include directories
# ZZip_LIBRARIES - link these to use ZZip
include(FindPkgMacros)
findpkg_begin(ZZip)
# Get path, convert backslashes as ${ENV_${var}}
getenv_path(ZZIP_HOME)
# construct search paths
set(ZZip_PREFIX_PATH ${ZZIP_HOME} ${ENV_ZZIP_HOME})
create_search_paths(ZZip)
# redo search if prefix path changed
clear_if_changed(ZZip_PREFIX_PATH
ZZip_LIBRARY_FWK
ZZip_LIBRARY_REL
ZZip_LIBRARY_DBG
ZZip_INCLUDE_DIR
)
set(ZZip_LIBRARY_NAMES zzip zziplib)
get_debug_names(ZZip_LIBRARY_NAMES)
use_pkgconfig(ZZip_PKGC zziplib)
findpkg_framework(ZZip)
find_path(ZZip_INCLUDE_DIR NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS})
find_library(ZZip_LIBRARY_REL NAMES ${ZZip_LIBRARY_NAMES} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
find_library(ZZip_LIBRARY_DBG NAMES ${ZZip_LIBRARY_NAMES_DBG} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
make_library_set(ZZip_LIBRARY)
findpkg_finish(ZZip)
Loading…
Cancel
Save