Show
Ignore:
Timestamp:
09/09/10 12:44:11 (4 years ago)
Author:
robert
Message:

From Torben Dannhauer, "I extended the attached CMAKE module to search for the collada libraries of my VS2008 3rdParty package if no other library is found.

No CMAKE should recognize all libraries of the VS2008 3rdParty Package."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/CMakeModules/FindCOLLADA.cmake

    r10637 r11749  
    1414# Created by Robert Osfield.  
    1515 
    16 SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory") 
     16 
     17# Check if COLLADA_DIR is set, otherwise use ACTUAL_3DPARTY_DIR: 
     18SET( COLLADA_ENV_VAR_AVAILABLE $ENV{COLLADA_DIR} ) 
     19IF ( COLLADA_ENV_VAR_AVAILABLE ) 
     20    SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory" FORCE) 
     21ELSE ( COLLADA_ENV_VAR_AVAILABLE ) 
     22    SET(COLLADA_DOM_ROOT "${ACTUAL_3DPARTY_DIR}/include/1.4/dom" CACHE PATH "Location of Collada DOM directory" FORCE) 
     23ENDIF( COLLADA_ENV_VAR_AVAILABLE ) 
     24 
     25 
    1726 
    1827IF(APPLE) 
     
    4251    /opt/include 
    4352    /usr/freeware/include 
     53    ${ACTUAL_3DPARTY_DIR}/include 
    4454) 
    4555 
     
    6373    /opt/lib 
    6474    /usr/freeware/lib64 
     75    ${ACTUAL_3DPARTY_DIR}/lib 
    6576) 
    6677 
     
    8495    /opt/lib 
    8596    /usr/freeware/lib64 
     97    ${ACTUAL_3DPARTY_DIR}/lib 
    8698) 
    8799 
     
    105117    /opt/lib 
    106118    /usr/freeware/lib64 
     119    ${ACTUAL_3DPARTY_DIR}/lib 
    107120) 
    108121 
     
    126139    /opt/lib 
    127140    /usr/freeware/lib64 
     141    ${ACTUAL_3DPARTY_DIR}/lib 
    128142) 
    129143 
     
    132146    FIND_PACKAGE(LibXml2) 
    133147    IF (LIBXML2_FOUND) 
    134         SET(COLLADA_LIBXML_LIBRARY ${LIBXML2_LIBRARIES}) 
     148        SET(COLLADA_LIBXML_LIBRARY "${LIBXML2_LIBRARIES}" CACHE FILEPATH "" FORCE) 
    135149    ELSE(LIBXML2_FOUND) 
    136150        IF(WIN32) 
     
    140154                ${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib 
    141155                ${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib 
     156                ${ACTUAL_3DPARTY_DIR}/lib 
    142157            ) 
    143158        ENDIF(WIN32) 
     
    146161    FIND_PACKAGE(ZLIB) 
    147162    IF (ZLIB_FOUND) 
    148         SET(COLLADA_ZLIB_LIBRARY ${ZLIB_LIBRARY}) 
     163        SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE) 
    149164    ELSE(ZLIB_FOUND) 
    150165        IF(WIN32) 
     
    154169                ${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib 
    155170                ${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib 
     171                ${ACTUAL_3DPARTY_DIR}/lib 
    156172            ) 
    157173        ENDIF(WIN32) 
     
    164180        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac 
    165181        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw 
     182        ${ACTUAL_3DPARTY_DIR}/lib 
    166183    ) 
    167184 
    168185    FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG 
    169         NAMES pcrecpp-d 
    170         PATHS 
    171         ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME} 
    172         ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac 
    173         ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw 
     186        NAMES pcrecpp-d pcrecppd 
     187        PATHS 
     188        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME} 
     189        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac 
     190        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw 
     191        ${ACTUAL_3DPARTY_DIR}/lib 
    174192    ) 
    175193 
     
    180198        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac 
    181199        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw 
     200        ${ACTUAL_3DPARTY_DIR}/lib 
    182201    ) 
    183202 
    184203    FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG 
    185         NAMES pcre-d 
    186         PATHS 
    187         ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME} 
    188         ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac 
    189         ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw 
     204        NAMES pcre-d pcred 
     205        PATHS 
     206        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/${COLLADA_BUILDNAME} 
     207        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac 
     208        ${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw 
     209        ${ACTUAL_3DPARTY_DIR}/lib 
    190210    ) 
    191211 
     
    195215        ${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib 
    196216        ${COLLADA_DOM_ROOT}/external-libs/minizip/mac 
     217        ${ACTUAL_3DPARTY_DIR}/lib 
    197218    ) 
    198219 
    199220    FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY_DEBUG 
    200         NAMES minizip-d 
     221        NAMES minizip-d minizipD 
    201222        PATHS 
    202223        ${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib 
    203224        ${COLLADA_DOM_ROOT}/external-libs/minizip/mac 
     225        ${ACTUAL_3DPARTY_DIR}/lib 
    204226    ) 
    205227 
    206228    FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY 
    207         NAMES libboost_filesystem boost_filesystem 
    208         PATHS 
    209         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
    210         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     229        NAMES libboost_filesystem boost_filesystem libboost_filesystem-vc90-mt 
     230        PATHS 
     231        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
     232        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     233        ${ACTUAL_3DPARTY_DIR}/lib 
    211234    ) 
    212235 
    213236    FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG 
    214         NAMES libboost_filesystem-d boost_filesystem-d 
    215         PATHS 
    216         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
    217         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     237        NAMES libboost_filesystem-d boost_filesystem-d libboost_filesystem-vc90-mt-gd 
     238        PATHS 
     239        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
     240        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     241        ${ACTUAL_3DPARTY_DIR}/lib 
    218242    ) 
    219243 
    220244    FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY 
    221         NAMES libboost_system boost_system 
    222         PATHS 
    223         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
    224         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     245        NAMES libboost_system boost_system libboost_system-vc90-mt 
     246        PATHS 
     247        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
     248        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     249        ${ACTUAL_3DPARTY_DIR}/lib 
    225250    ) 
    226251 
    227252    FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG 
    228         NAMES libboost_system-d boost_system-d 
    229         PATHS 
    230         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
    231         ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     253        NAMES libboost_system-d boost_system-d libboost_system-vc90-mt-gd 
     254        PATHS 
     255        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} 
     256        ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw 
     257        ${ACTUAL_3DPARTY_DIR}/lib 
    232258    ) 
    233259