khanat-opennel-code/code/CMakeModules/FindOgg.cmake
StudioEtrange 91e6b23d3f ** PCH Support for NMake with VS2012
NMAKE-VS2012 Error LNK2011
while NMAKE-VS2010 does not complain
we need to link the pch.obj file
see http://msdn.microsoft.com/en-us/library/3ay26wa2(v=vs.110).aspx

** PCH Support for Ninja
Ninja need to add property
        OBJECT_DEPENDS for using PCH
        OBJECT_OUTPUTS for create PCH
see http://public.kitware.com/pipermail/cmake-developers/2012-March/003653.html
2013-09-05 17:18:01 +02:00

49 lines
1 KiB
CMake

# - Locate Ogg library
# This module defines
# OGG_LIBRARY, the library to link against
# OGG_FOUND, if false, do not try to link to OGG
# OGG_INCLUDE_DIR, where to find headers.
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
# in cache already
SET(OGG_FIND_QUIETLY TRUE)
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
FIND_PATH(OGG_INCLUDE_DIR
ogg/ogg.h
PATHS
$ENV{OGG_DIR}/include
/usr/local/include
/usr/include
/sw/include
/opt/local/include
/opt/csw/include
/opt/include
)
FIND_LIBRARY(OGG_LIBRARY
NAMES ogg libogg
PATHS
$ENV{OGG_DIR}/lib
/usr/local/lib
/usr/lib
/usr/local/X11R6/lib
/usr/X11R6/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib64
)
IF(OGG_LIBRARY AND OGG_INCLUDE_DIR)
SET(OGG_FOUND "YES")
IF(NOT OGG_FIND_QUIETLY)
MESSAGE(STATUS "Found Ogg: ${OGG_LIBRARY}")
ENDIF(NOT OGG_FIND_QUIETLY)
ELSE(OGG_LIBRARY AND OGG_INCLUDE_DIR)
IF(NOT OGG_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Ogg!")
ENDIF(NOT OGG_FIND_QUIETLY)
ENDIF(OGG_LIBRARY AND OGG_INCLUDE_DIR)