2008-12-02 18:42:58 +08:00
|
|
|
# Locate Collada
|
|
|
|
# This module defines:
|
2007-05-04 22:25:02 +08:00
|
|
|
# COLLADA_INCLUDE_DIR, where to find the headers
|
|
|
|
#
|
2008-12-02 18:42:58 +08:00
|
|
|
# COLLADA_LIBRARY, COLLADA_LIBRARY_DEBUG
|
|
|
|
# COLLADA_FOUND, if false, do not try to link to Collada dynamically
|
|
|
|
#
|
|
|
|
# COLLADA_LIBRARY_STATIC, COLLADA_LIBRARY_STATIC_DEBUG
|
|
|
|
# COLLADA_STATIC_FOUND, if false, do not try to link to Collada statically
|
|
|
|
#
|
2007-05-04 22:25:02 +08:00
|
|
|
# $COLLADA_DIR is an environment variable that would
|
|
|
|
# correspond to the ./configure --prefix=$COLLADA_DIR
|
|
|
|
#
|
|
|
|
# Created by Robert Osfield.
|
|
|
|
|
2009-02-10 19:44:50 +08:00
|
|
|
SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory")
|
|
|
|
|
2009-03-24 00:11:41 +08:00
|
|
|
IF(APPLE)
|
|
|
|
SET(COLLADA_BUILDNAME "mac")
|
|
|
|
ELSEIF(MINGW)
|
|
|
|
SET(COLLADA_BUILDNAME "mingw")
|
|
|
|
ELSEIF(MSVC90)
|
|
|
|
SET(COLLADA_BUILDNAME "vc9")
|
|
|
|
ELSE(APPLE)
|
|
|
|
SET(COLLADA_BUILDNAME "vc8")
|
|
|
|
ENDIF(APPLE)
|
|
|
|
|
|
|
|
|
2007-05-04 22:25:02 +08:00
|
|
|
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
2009-02-10 19:44:50 +08:00
|
|
|
${COLLADA_DOM_ROOT}/include
|
2007-05-04 22:25:02 +08:00
|
|
|
$ENV{COLLADA_DIR}/include
|
|
|
|
$ENV{COLLADA_DIR}
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
|
/usr/local/include
|
2008-05-08 20:36:07 +08:00
|
|
|
/usr/local/include/colladadom
|
|
|
|
/usr/include/
|
|
|
|
/usr/include/colladadom
|
2007-05-04 22:25:02 +08:00
|
|
|
/sw/include # Fink
|
|
|
|
/opt/local/include # DarwinPorts
|
|
|
|
/opt/csw/include # Blastwave
|
|
|
|
/opt/include
|
|
|
|
/usr/freeware/include
|
|
|
|
)
|
|
|
|
|
2008-12-02 18:42:58 +08:00
|
|
|
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
2008-11-26 20:07:03 +08:00
|
|
|
NAMES collada_dom collada14dom libcollada14dom21
|
2007-05-04 22:25:02 +08:00
|
|
|
PATHS
|
2009-03-24 00:11:41 +08:00
|
|
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
|
|
|
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
|
2008-11-26 20:07:03 +08:00
|
|
|
$ENV{COLLADA_DIR}/lib
|
|
|
|
$ENV{COLLADA_DIR}/lib-dbg
|
|
|
|
$ENV{COLLADA_DIR}
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/local/lib64
|
|
|
|
/usr/lib
|
|
|
|
/usr/lib64
|
|
|
|
/sw/lib
|
|
|
|
/opt/local/lib
|
|
|
|
/opt/csw/lib
|
|
|
|
/opt/lib
|
|
|
|
/usr/freeware/lib64
|
|
|
|
)
|
|
|
|
|
2008-12-02 18:42:58 +08:00
|
|
|
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
2008-11-26 20:07:03 +08:00
|
|
|
NAMES collada_dom-d collada14dom-d libcollada14dom21-d
|
|
|
|
PATHS
|
2009-03-24 00:11:41 +08:00
|
|
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
|
|
|
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d
|
2007-05-04 22:25:02 +08:00
|
|
|
$ENV{COLLADA_DIR}/lib
|
|
|
|
$ENV{COLLADA_DIR}/lib-dbg
|
|
|
|
$ENV{COLLADA_DIR}
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
|
/usr/local/lib
|
2008-05-08 20:36:07 +08:00
|
|
|
/usr/local/lib64
|
2007-05-04 22:25:02 +08:00
|
|
|
/usr/lib
|
2008-05-08 20:36:07 +08:00
|
|
|
/usr/lib64
|
2007-05-04 22:25:02 +08:00
|
|
|
/sw/lib
|
|
|
|
/opt/local/lib
|
|
|
|
/opt/csw/lib
|
|
|
|
/opt/lib
|
|
|
|
/usr/freeware/lib64
|
|
|
|
)
|
|
|
|
|
2009-02-10 19:44:50 +08:00
|
|
|
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
|
|
|
NAMES libcollada14dom21-s
|
2008-12-02 18:42:58 +08:00
|
|
|
PATHS
|
2009-03-24 00:11:41 +08:00
|
|
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
|
|
|
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
|
2008-12-02 18:42:58 +08:00
|
|
|
$ENV{COLLADA_DIR}/lib
|
|
|
|
$ENV{COLLADA_DIR}/lib-dbg
|
|
|
|
$ENV{COLLADA_DIR}
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/local/lib64
|
|
|
|
/usr/lib
|
|
|
|
/usr/lib64
|
|
|
|
/sw/lib
|
|
|
|
/opt/local/lib
|
|
|
|
/opt/csw/lib
|
|
|
|
/opt/lib
|
|
|
|
/usr/freeware/lib64
|
|
|
|
)
|
2007-05-04 22:25:02 +08:00
|
|
|
|
2008-12-02 18:42:58 +08:00
|
|
|
FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|
|
|
NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd
|
|
|
|
PATHS
|
2009-03-24 00:11:41 +08:00
|
|
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
|
|
|
|
$ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d
|
2008-12-02 18:42:58 +08:00
|
|
|
$ENV{COLLADA_DIR}/lib
|
|
|
|
$ENV{COLLADA_DIR}/lib-dbg
|
|
|
|
$ENV{COLLADA_DIR}
|
|
|
|
~/Library/Frameworks
|
|
|
|
/Library/Frameworks
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/local/lib64
|
|
|
|
/usr/lib
|
|
|
|
/usr/lib64
|
|
|
|
/sw/lib
|
|
|
|
/opt/local/lib
|
|
|
|
/opt/csw/lib
|
|
|
|
/opt/lib
|
|
|
|
/usr/freeware/lib64
|
|
|
|
)
|
2007-05-04 22:25:02 +08:00
|
|
|
|
2009-02-10 19:44:50 +08:00
|
|
|
# find extra libraries that the static linking requires
|
|
|
|
|
|
|
|
FIND_PACKAGE(LibXml2)
|
|
|
|
IF (LIBXML2_FOUND)
|
|
|
|
SET(COLLADA_LIBXML_LIBRARY ${LIBXML2_LIBRARIES})
|
|
|
|
ELSE(LIBXML2_FOUND)
|
2009-02-11 03:25:50 +08:00
|
|
|
IF(WIN32)
|
|
|
|
FIND_LIBRARY(COLLADA_LIBXML_LIBRARY
|
|
|
|
NAMES libxml2
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
|
|
|
)
|
|
|
|
ENDIF(WIN32)
|
2009-02-10 19:44:50 +08:00
|
|
|
ENDIF(LIBXML2_FOUND)
|
|
|
|
|
|
|
|
FIND_PACKAGE(ZLIB)
|
|
|
|
IF (ZLIB_FOUND)
|
|
|
|
SET(COLLADA_ZLIB_LIBRARY ${ZLIB_LIBRARY})
|
|
|
|
ELSE(ZLIB_FOUND)
|
2009-02-11 03:25:50 +08:00
|
|
|
IF(WIN32)
|
|
|
|
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
|
|
|
|
NAMES zlib
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
|
|
|
)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
ENDIF(ZLIB_FOUND)
|
|
|
|
|
2009-06-12 17:41:10 +08:00
|
|
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY
|
|
|
|
NAMES pcrecpp
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
|
|
|
|
NAMES pcrecpp-d
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY
|
|
|
|
NAMES pcre
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
|
|
|
|
NAMES pcre-d
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY
|
|
|
|
NAMES minizip
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY_DEBUG
|
|
|
|
NAMES minizip-d
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
|
|
|
NAMES libboost_filesystem boost_filesystem
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
|
|
|
|
NAMES libboost_filesystem-d boost_filesystem-d
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
|
|
|
|
NAMES libboost_system boost_system
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
|
|
|
NAMES libboost_system-d boost_system-d
|
|
|
|
PATHS
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
|
|
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
|
|
|
)
|
2009-02-10 19:44:50 +08:00
|
|
|
|
|
|
|
|
2008-12-02 18:42:58 +08:00
|
|
|
SET(COLLADA_FOUND "NO")
|
|
|
|
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
|
|
|
IF (COLLADA_INCLUDE_DIR)
|
|
|
|
SET(COLLADA_FOUND "YES")
|
|
|
|
ENDIF(COLLADA_INCLUDE_DIR)
|
|
|
|
ENDIF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|