aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-07-24 10:44:08 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-07-24 10:44:08 -0700
commit27895c8d0b14cc30bbf62b62acbafb3392ebba39 (patch)
tree461ac74874bb4deaf3b82d468ecdaae9b7522fe7
parent3e92aa6ae461d0857e23b44a59fa14c11b0cf287 (diff)
parenteb66ce1b46fb07d4fec20c77001e24d0dd7ddf50 (diff)
downloadvcpkg-27895c8d0b14cc30bbf62b62acbafb3392ebba39.tar.gz
vcpkg-27895c8d0b14cc30bbf62b62acbafb3392ebba39.zip
Merge pull request #1512 from saedrna-master
OpenSceneGraph and embree port
-rw-r--r--ports/embree/CONTROL4
-rw-r--r--ports/embree/portfile.cmake50
-rw-r--r--ports/osg/CONTROL4
-rw-r--r--ports/osg/portfile.cmake58
4 files changed, 116 insertions, 0 deletions
diff --git a/ports/embree/CONTROL b/ports/embree/CONTROL
new file mode 100644
index 000000000..3f4ff53a1
--- /dev/null
+++ b/ports/embree/CONTROL
@@ -0,0 +1,4 @@
+Source: embree
+Version: 2.16.4-1
+Description: High Performance Ray Tracing Kernels.
+Build-Depends: tbb
diff --git a/ports/embree/portfile.cmake b/ports/embree/portfile.cmake
new file mode 100644
index 000000000..8d054d3ab
--- /dev/null
+++ b/ports/embree/portfile.cmake
@@ -0,0 +1,50 @@
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/embree-2.16.4)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/embree/embree/archive/v2.16.4.zip"
+ FILENAME "embree-2.16.4.zip"
+ SHA512 d26d31c7866c072d562dd824af02c90a1bc0302a2765fa6101925956f9b61870e45a4f0a54edae87d07a63aa4687f4244e3e5554491729ea31b617e87d02fb11
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake)
+
+if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(EMBREE_STATIC_RUNTIME ON)
+else()
+ set(EMBREE_STATIC_RUNTIME OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DEMBREE_ISPC_SUPPORT=OFF
+ -DEMBREE_TUTORIALS=OFF
+ -DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME}
+ "-DTBB_LIBRARIES=TBB::tbb"
+ "-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include"
+)
+
+# just wait, the release build of embree is insanely slow in MSVC
+# a single file will took about 2-10 min
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+# these cmake files do not seem to contain helpful configuration for find libs, just remove them
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config.cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config-version.cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models)
+
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree/doc)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree/copyright)
diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL
new file mode 100644
index 000000000..867a8b4e0
--- /dev/null
+++ b/ports/osg/CONTROL
@@ -0,0 +1,4 @@
+Source: osg
+Version: 3.5.6
+Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit.
+Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff
diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake
new file mode 100644
index 000000000..5d68a57be
--- /dev/null
+++ b/ports/osg/portfile.cmake
@@ -0,0 +1,58 @@
+# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+
+include(vcpkg_common_functions)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ message(STATUS "Warning: Static building will not support load data through plugins.")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenSceneGraph-OpenSceneGraph-3.5.6)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/openscenegraph/OpenSceneGraph/archive/OpenSceneGraph-3.5.6.zip"
+ FILENAME "osg-3.5.6.zip"
+ SHA512 f1745748ff86243291da96a4781af9487204a82540d3cc42b33bcbf693137ab9a6a741cad18afa74f62ef66933840ac54894397f880471f6c639210fa23e7f4b
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ # PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DOSG_USE_UTF8_FILENAME=ON
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+
+# handle osg tools and plugins
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osg)
+file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
+
+file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
+file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
+file(REMOVE_RECURSE ${OSG_TOOLS})
+file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
+file(REMOVE_RECURSE ${OSG_TOOLS_DBG})
+
+file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/*.dll)
+file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6)
+file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/*.dll)
+file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/osg/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osg/copyright)