From Michael Platings, "I've changed this file so CMake automatically chooses the correct directories & libs out of vc8,vc9,mac,mingw

Tested with Visual Studio 9 2008"
This commit is contained in:
Robert Osfield 2009-03-23 16:11:41 +00:00
parent 63cdbd8714
commit 1cc0b09552

View File

@ -15,6 +15,17 @@
SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory") SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory")
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)
FIND_PATH(COLLADA_INCLUDE_DIR dae.h FIND_PATH(COLLADA_INCLUDE_DIR dae.h
${COLLADA_DOM_ROOT}/include ${COLLADA_DOM_ROOT}/include
$ENV{COLLADA_DIR}/include $ENV{COLLADA_DIR}/include
@ -39,8 +50,8 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
NAMES collada_dom collada14dom libcollada14dom21 NAMES collada_dom collada14dom libcollada14dom21
PATHS PATHS
${COLLADA_DOM_ROOT}/build/vc8-1.4 ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
$ENV{COLLADA_DIR}/build/vc8-1.4 $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
$ENV{COLLADA_DIR}/lib $ENV{COLLADA_DIR}/lib
$ENV{COLLADA_DIR}/lib-dbg $ENV{COLLADA_DIR}/lib-dbg
$ENV{COLLADA_DIR} $ENV{COLLADA_DIR}
@ -64,8 +75,8 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
NAMES collada_dom-d collada14dom-d libcollada14dom21-d NAMES collada_dom-d collada14dom-d libcollada14dom21-d
PATHS PATHS
${COLLADA_DOM_ROOT}/build/vc8-1.4-d ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
$ENV{COLLADA_DIR}/build/vc8-1.4-d $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d
$ENV{COLLADA_DIR}/lib $ENV{COLLADA_DIR}/lib
$ENV{COLLADA_DIR}/lib-dbg $ENV{COLLADA_DIR}/lib-dbg
$ENV{COLLADA_DIR} $ENV{COLLADA_DIR}
@ -89,8 +100,8 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
FIND_LIBRARY(COLLADA_STATIC_LIBRARY FIND_LIBRARY(COLLADA_STATIC_LIBRARY
NAMES libcollada14dom21-s NAMES libcollada14dom21-s
PATHS PATHS
${COLLADA_DOM_ROOT}/build/vc8-1.4 ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
$ENV{COLLADA_DIR}/build/vc8-1.4 $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4
$ENV{COLLADA_DIR}/lib $ENV{COLLADA_DIR}/lib
$ENV{COLLADA_DIR}/lib-dbg $ENV{COLLADA_DIR}/lib-dbg
$ENV{COLLADA_DIR} $ENV{COLLADA_DIR}
@ -114,8 +125,8 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY
FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd
PATHS PATHS
${COLLADA_DOM_ROOT}/build/vc8-1.4-d ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
$ENV{COLLADA_DIR}/build/vc8-1.4-d $ENV{COLLADA_DIR}/build/${COLLADA_BUILDNAME}-1.4-d
$ENV{COLLADA_DIR}/lib $ENV{COLLADA_DIR}/lib
$ENV{COLLADA_DIR}/lib-dbg $ENV{COLLADA_DIR}/lib-dbg
$ENV{COLLADA_DIR} $ENV{COLLADA_DIR}
@ -173,8 +184,7 @@ IF(COLLADA_STATIC_LIBRARY)
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY
NAMES pcrecpp NAMES pcrecpp
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
) )
@ -182,8 +192,7 @@ IF(COLLADA_STATIC_LIBRARY)
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
NAMES pcrecpp-d NAMES pcrecpp-d
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
) )
@ -191,8 +200,7 @@ IF(COLLADA_STATIC_LIBRARY)
FIND_LIBRARY(COLLADA_PCRE_LIBRARY FIND_LIBRARY(COLLADA_PCRE_LIBRARY
NAMES pcre NAMES pcre
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
) )
@ -200,8 +208,7 @@ IF(COLLADA_STATIC_LIBRARY)
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
NAMES pcre-d NAMES pcre-d
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
) )
@ -231,32 +238,28 @@ IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
NAMES libboost_filesystem NAMES libboost_filesystem
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
) )
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
NAMES libboost_filesystem-d NAMES libboost_filesystem-d
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
) )
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
NAMES libboost_system NAMES libboost_system
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
) )
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
NAMES libboost_system-d NAMES libboost_system-d
PATHS PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8 ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
) )