From Roger James and Robert Osfield, fixes and reorganization to better support Windows dyanmic library build
This commit is contained in:
parent
a29b0a2f76
commit
17da548343
@ -144,110 +144,128 @@ IF(COLLADA_STATIC_LIBRARY)
|
|||||||
IF (LIBXML2_FOUND)
|
IF (LIBXML2_FOUND)
|
||||||
SET(COLLADA_LIBXML_LIBRARY ${LIBXML2_LIBRARIES})
|
SET(COLLADA_LIBXML_LIBRARY ${LIBXML2_LIBRARIES})
|
||||||
ELSE(LIBXML2_FOUND)
|
ELSE(LIBXML2_FOUND)
|
||||||
FIND_LIBRARY(COLLADA_LIBXML_LIBRARY
|
IF(WIN32)
|
||||||
NAMES libxml2
|
FIND_LIBRARY(COLLADA_LIBXML_LIBRARY
|
||||||
PATHS
|
NAMES libxml2
|
||||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
||||||
)
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
||||||
|
)
|
||||||
|
ENDIF(WIN32)
|
||||||
ENDIF(LIBXML2_FOUND)
|
ENDIF(LIBXML2_FOUND)
|
||||||
|
|
||||||
FIND_PACKAGE(ZLIB)
|
FIND_PACKAGE(ZLIB)
|
||||||
IF (ZLIB_FOUND)
|
IF (ZLIB_FOUND)
|
||||||
SET(COLLADA_ZLIB_LIBRARY ${ZLIB_LIBRARY})
|
SET(COLLADA_ZLIB_LIBRARY ${ZLIB_LIBRARY})
|
||||||
ELSE(ZLIB_FOUND)
|
ELSE(ZLIB_FOUND)
|
||||||
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
|
IF(WIN32)
|
||||||
NAMES zlib
|
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
|
||||||
PATHS
|
NAMES zlib
|
||||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
||||||
)
|
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
||||||
|
)
|
||||||
|
ENDIF(WIN32)
|
||||||
ENDIF(ZLIB_FOUND)
|
ENDIF(ZLIB_FOUND)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY
|
IF(WIN32)
|
||||||
NAMES pcrecpp
|
|
||||||
PATHS
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY
|
||||||
NAMES pcrecpp-d
|
NAMES pcrecpp
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
${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
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_PCRE_LIBRARY
|
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
|
||||||
NAMES pcre
|
NAMES pcrecpp-d
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
${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
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY
|
||||||
NAMES pcre-d
|
NAMES pcre
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
${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
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
|
||||||
NAMES libboost_filesystem
|
NAMES pcre-d
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||||
)
|
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY
|
||||||
NAMES libboost_filesystem-d
|
NAMES minizip
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
)
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
|
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY_DEBUG
|
||||||
NAMES libboost_system
|
NAMES minizip-d
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
)
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
ENDIF(WIN32)
|
||||||
NAMES libboost_system-d
|
|
||||||
PATHS
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/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
|
|
||||||
)
|
|
||||||
|
|
||||||
ENDIF(COLLADA_STATIC_LIBRARY)
|
ENDIF(COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
|
||||||
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
||||||
|
NAMES libboost_filesystem
|
||||||
|
PATHS
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${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/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${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/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${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/vc8
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||||
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(COLLADA_BOOST_INCLUDE_DIR ${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)
|
||||||
IF (COLLADA_INCLUDE_DIR)
|
IF (COLLADA_INCLUDE_DIR)
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
IF (WIN32)
|
||||||
|
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4 ${COLLADA_BOOST_INCLUDE_DIR} )
|
||||||
|
ELSE (WIN32)
|
||||||
|
INCLUDE_DIRECTORIES( ${COLLADA_INCLUDE_DIR} ${COLLADA_INCLUDE_DIR}/1.4)
|
||||||
|
ENDIF (WIN32)
|
||||||
|
|
||||||
SET(TARGET_SRC
|
SET(TARGET_SRC
|
||||||
daeReader.cpp
|
daeReader.cpp
|
||||||
@ -38,14 +42,15 @@ ENDIF(COLLADA_DYNAMIC_LIBRARY AND COLLADA_STATIC_LIBRARY)
|
|||||||
|
|
||||||
IF (COLLADA_USE_STATIC)
|
IF (COLLADA_USE_STATIC)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
|
ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB)
|
||||||
SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_ZLIB_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_PCRE_LIBRARY COLLADA_MINIZIP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_ZLIB_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_PCRE_LIBRARY COLLADA_MINIZIP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
SET(TARGET_LIBRARIES_VARS COLLADA_STATIC_LIBRARY COLLADA_LIBXML_LIBRARY COLLADA_PCRECPP_LIBRARY COLLADA_BOOST_FILESYSTEM_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
ELSE (COLLADA_USE_STATIC)
|
ELSE (COLLADA_USE_STATIC)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
ADD_DEFINITIONS(-DDOM_DYNAMIC)
|
ADD_DEFINITIONS(-DDOM_DYNAMIC -DBOOST_ALL_NO_LIB)
|
||||||
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY)
|
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY COLLADA_BOOST_SYSTEM_LIBRARY)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY)
|
SET(TARGET_LIBRARIES_VARS COLLADA_DYNAMIC_LIBRARY)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
Loading…
Reference in New Issue
Block a user