diff options
| author | Calum Robinson <calumr@users.noreply.github.com> | 2019-02-11 22:23:46 +0000 |
|---|---|---|
| committer | Codiferous <44823842+Codiferous@users.noreply.github.com> | 2019-02-11 14:23:46 -0800 |
| commit | 10bde77210cc5360cdc455ec961e4bfab54592ea (patch) | |
| tree | 1a74a7dd8e3234badd26e487f54e860d3d668779 /ports/osg | |
| parent | f5f4070c9659c1fa63e45fea6f74104bc5eaec42 (diff) | |
| download | vcpkg-10bde77210cc5360cdc455ec961e4bfab54592ea.tar.gz vcpkg-10bde77210cc5360cdc455ec961e4bfab54592ea.zip | |
[osg] Add Collada model support to OpenSceneGraph (#3950)
* [collada-dom] Initial collada-dom port
* [osg] Add Collada file support
Diffstat (limited to 'ports/osg')
| -rw-r--r-- | ports/osg/CONTROL | 4 | ||||
| -rw-r--r-- | ports/osg/collada.patch | 76 | ||||
| -rw-r--r-- | ports/osg/portfile.cmake | 2 |
3 files changed, 82 insertions, 0 deletions
diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL index dc9396dd4..2cca0cdaa 100644 --- a/ports/osg/CONTROL +++ b/ports/osg/CONTROL @@ -2,3 +2,7 @@ Source: osg Version: 3.6.2 Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff + +Feature: collada +Description: Support for Collada (.dae) files +Build-Depends: collada-dom diff --git a/ports/osg/collada.patch b/ports/osg/collada.patch new file mode 100644 index 000000000..7c856c86d --- /dev/null +++ b/ports/osg/collada.patch @@ -0,0 +1,76 @@ +diff --git a/CMakeModules/FindCOLLADA.cmake b/CMakeModules/FindCOLLADA.cmake
+index 8c9c2fc33..6a8ab04ca 100644
+--- a/CMakeModules/FindCOLLADA.cmake
++++ b/CMakeModules/FindCOLLADA.cmake
+@@ -25,11 +25,11 @@ ENDIF()
+
+ IF(APPLE)
+ SET(COLLADA_BUILDNAME "mac")
+- SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
++ SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
+ ELSEIF(MINGW)
+ SET(COLLADA_BUILDNAME "mingw")
+- SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
+-ELSEIF(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910 )
++ SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
++ELSEIF(MSVC_VERSION GREATER_EQUAL 1900 )
+ SET(COLLADA_BUILDNAME "vc14")
+ SET(COLLADA_BOOST_BUILDNAME "vc140")
+ ELSEIF(MSVC_VERSION EQUAL 1800)
+@@ -58,6 +58,7 @@ ENDIF()
+
+
+ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
++ PATHS
+ ${COLLADA_DOM_ROOT}/include
+ $ENV{COLLADA_DIR}/include
+ $ENV{COLLADA_DIR}
+@@ -65,27 +66,19 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
+ /Library/Frameworks
+ /opt/local/Library/Frameworks #macports
+ /usr/local/include
+- /usr/local/include/colladadom
+- /usr/local/include/collada-dom
+- /usr/local/include/collada-dom2.5
+- /usr/local/include/collada-dom2.4
+- /usr/local/include/collada-dom2.2
+- /opt/local/include/collada-dom
+- /opt/local/include/collada-dom2.5
+- /opt/local/include/collada-dom2.4
+- /opt/local/include/collada-dom2.2
+ /usr/include/
+- /usr/include/colladadom
+- /usr/include/collada-dom
+- /usr/include/collada-dom2.5
+- /usr/include/collada-dom2.4
+- /usr/include/collada-dom2.2
+ /sw/include # Fink
+ /opt/local/include # DarwinPorts
+ /opt/csw/include # Blastwave
+ /opt/include
+ /usr/freeware/include
+ ${ACTUAL_3DPARTY_DIR}/include
++ PATH_SUFFIXES
++ colladadom
++ collada-dom
++ collada-dom2.5
++ collada-dom2.4
++ collada-dom2.2
+ )
+
+ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
+diff --git a/src/osgPlugins/dae/CMakeLists.txt b/src/osgPlugins/dae/CMakeLists.txt
+index af03fb866..7eadfc2f3 100644
+--- a/src/osgPlugins/dae/CMakeLists.txt
++++ b/src/osgPlugins/dae/CMakeLists.txt
+@@ -49,7 +49,9 @@ ELSE()
+ ENDIF()
+
+ ADD_DEFINITIONS(-DNO_BOOST)
+-ADD_DEFINITIONS(-DCOLLADA_DOM_SUPPORT141)
++ADD_DEFINITIONS(-DCOLLADA_DOM_USING_141
++ -DCOLLADA_DOM_SUPPORT141
++ -DCOLLADA_DOM_SUPPORT150)
+
+ IF (COLLADA_DOM_2_4_OR_LATER)
+ ADD_DEFINITIONS(-DCOLLADA_DOM_2_4_OR_LATER)
diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake index ca5c18f59..e72b5807b 100644 --- a/ports/osg/portfile.cmake +++ b/ports/osg/portfile.cmake @@ -22,6 +22,8 @@ vcpkg_from_github( REF OpenSceneGraph-3.6.2 SHA512 6949dd4dea9dcffe4228086b72eafdb253bf1403b3b7a70a4727848c3cde23ad0270f41b1c3e2bdbfd410ec067ecce2052a5d26c61b032b6d46ce84b8c931bfb HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/collada.patch" ) vcpkg_configure_cmake( |
