From Roger James and Robert Osfield, clean up of COLLADA CMake support
This commit is contained in:
parent
77fcb5529d
commit
fac2ffecb3
@ -127,8 +127,6 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
/usr/freeware/lib64
|
/usr/freeware/lib64
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(COLLADA_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
# find extra libraries that the static linking requires
|
# find extra libraries that the static linking requires
|
||||||
|
|
||||||
FIND_PACKAGE(LibXml2)
|
FIND_PACKAGE(LibXml2)
|
||||||
@ -159,97 +157,80 @@ IF(COLLADA_STATIC_LIBRARY)
|
|||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
ENDIF(ZLIB_FOUND)
|
ENDIF(ZLIB_FOUND)
|
||||||
|
|
||||||
IF(WIN32)
|
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
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
|
||||||
NAMES pcrecpp
|
NAMES pcrecpp-d
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
||||||
${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
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY
|
||||||
NAMES pcrecpp-d
|
NAMES pcre
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
||||||
${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
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_PCRE_LIBRARY
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
|
||||||
NAMES pcre
|
NAMES pcre-d
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
||||||
${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
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY
|
||||||
NAMES pcre-d
|
NAMES minizip
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
)
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY_DEBUG
|
||||||
NAMES minizip
|
NAMES minizip-d
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||||
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
||||||
NAMES minizip-d
|
NAMES libboost_filesystem boost_filesystem
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
ENDIF(COLLADA_STATIC_LIBRARY)
|
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
|
||||||
|
)
|
||||||
|
|
||||||
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
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
|
||||||
|
)
|
||||||
|
|
||||||
IF(WIN32)
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
||||||
|
NAMES libboost_system-d boost_system-d
|
||||||
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
PATHS
|
||||||
NAMES libboost_filesystem
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
PATHS
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
${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
|
|
||||||
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
|
|
||||||
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
|
|
||||||
PATHS
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_PATH(COLLADA_BOOST_INCLUDE_DIR boost/filesystem/convenience.hpp
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost
|
|
||||||
)
|
|
||||||
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
ENDIF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
SET(COLLADA_FOUND "NO")
|
SET(COLLADA_FOUND "NO")
|
||||||
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
IF (WIN32)
|
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
||||||
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4 ${COLLADA_BOOST_INCLUDE_DIR} )
|
|
||||||
ELSE ()
|
|
||||||
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
|
||||||
ENDIF ()
|
|
||||||
|
|
||||||
SET(TARGET_SRC
|
SET(TARGET_SRC
|
||||||
daeReader.cpp
|
daeReader.cpp
|
||||||
@ -35,6 +31,8 @@ ELSE()
|
|||||||
SET(COLLADA_USE_STATIC "NO")
|
SET(COLLADA_USE_STATIC "NO")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(-DNO_BOOST)
|
||||||
|
|
||||||
IF(COLLADA_USE_STATIC)
|
IF(COLLADA_USE_STATIC)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
|
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
|
||||||
@ -54,22 +52,18 @@ IF(COLLADA_USE_STATIC)
|
|||||||
COLLADA_PCRECPP_LIBRARY
|
COLLADA_PCRECPP_LIBRARY
|
||||||
COLLADA_PCRE_LIBRARY
|
COLLADA_PCRE_LIBRARY
|
||||||
COLLADA_BOOST_FILESYSTEM_LIBRARY
|
COLLADA_BOOST_FILESYSTEM_LIBRARY
|
||||||
COLLADA_BOOST_SYSTEM_LIBRARY)
|
COLLADA_BOOST_SYSTEM_LIBRARY)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
ADD_DEFINITIONS(-DDOM_DYNAMIC -DBOOST_ALL_NO_LIB)
|
ADD_DEFINITIONS(-DDOM_DYNAMIC)
|
||||||
SET(TARGET_LIBRARIES_VARS
|
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY)
|
||||||
COLLADA_DYNAMIC_LIBRARY
|
|
||||||
COLLADA_BOOST_SYSTEM_LIBRARY)
|
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(TARGET_LIBRARIES_VARS
|
SET(TARGET_LIBRARIES_VARS
|
||||||
COLLADA_PCRECPP_LIBRARY
|
COLLADA_DYNAMIC_LIBRARY
|
||||||
COLLADA_PCRE_LIBRARY
|
COLLADA_BOOST_FILESYSTEM_LIBRARY)
|
||||||
COLLADA_DYNAMIC_LIBRARY
|
ENDIF()
|
||||||
COLLADA_BOOST_FILESYSTEM_LIBRARY
|
|
||||||
COLLADA_BOOST_SYSTEM_LIBRARY)
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(TARGET_ADDED_LIBRARIES osgSim )
|
SET(TARGET_ADDED_LIBRARIES osgSim )
|
||||||
|
Loading…
Reference in New Issue
Block a user