aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2020-04-17 04:49:55 +0800
committerGitHub <noreply@github.com>2020-04-16 13:49:55 -0700
commitb12256a4af4e77e1ae87bbf76c1c3a654cdcd1a2 (patch)
tree2de29301d343a9358165bf537a83655ac62e9559
parent29c933ddb6fee5f46fb2f11e6db3d906ac01c927 (diff)
downloadvcpkg-b12256a4af4e77e1ae87bbf76c1c3a654cdcd1a2.tar.gz
vcpkg-b12256a4af4e77e1ae87bbf76c1c3a654cdcd1a2.zip
[osg] Add feature examples and plugins, fix configure options (#10082)
* [osg] Add feature examples and plugins, fix configure options * [osg] Add feature tools, packages and docs * [osgearth] Set dependency to osg[plugins] * [osgearth] bump version * [osg] Fix dependency * [osg] Remove feature plugins dependency nvtt * [osg] Remove empty folder * [osg] Fix dependency sdl and liblas * [osg] Fix install issue * [osg] Fix dependency nvtt * [osg] Re-fix dependency nvtt * [osg] Fix judgment when selecting nvtt * [osg] Create tools folder based on conditions * [osg] Fix typo * update baseline * re-trigger ci test * re-trigger ci test
-rw-r--r--ports/osg/CONTROL22
-rw-r--r--ports/osg/fix-liblas.patch16
-rw-r--r--ports/osg/fix-nvtt.patch14
-rw-r--r--ports/osg/fix-sdl.patch9
-rw-r--r--ports/osg/portfile.cmake78
-rw-r--r--ports/osgearth/CONTROL4
6 files changed, 115 insertions, 28 deletions
diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL
index b958ad092..ce46f95eb 100644
--- a/ports/osg/CONTROL
+++ b/ports/osg/CONTROL
@@ -1,9 +1,27 @@
Source: osg
-Version: 3.6.4-1
+Version: 3.6.4-2
Homepage: https://github.com/openscenegraph/OpenSceneGraph
Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit.
-Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff, fontconfig, sdl2, boost-asio (!windows), libxml2 (windows), giflib (windows), freeglut (windows), expat (windows), libiconv (windows)
+Build-Depends: zlib, fontconfig, boost-asio (!windows), freeglut (windows), expat (windows), openimageio (osx)
Feature: collada
Description: Support for Collada (.dae) files
Build-Depends: collada-dom
+
+Feature: tools
+Description: Enable to build OSG Applications (e.g. osgviewer)
+Build-Depends: freetype, sdl1, curl, libjpeg-turbo, libpng, libiconv (windows)
+
+Feature: examples
+Description: Enable to build OSG Examples
+Build-Depends: freetype, sdl1, sdl2, libiconv (windows)
+
+Feature: plugins
+Description: Build OSG Plugins - Disable for compile testing examples on a time limit
+Build-Depends: freetype, sdl1, curl, openexr, ilmbase, gdal, giflib (windows), jasper, libjpeg-turbo, libpng, tiff, libxml2 (windows), libiconv (windows), libgta, liblas, nvtt
+
+Feature: packages
+Description: Set to ON to generate CPack configuration files and packaging targets
+
+Feature: docs
+Description: Build OpenSceneGraph reference documentation using doxygen (use: make doc_openscenegraph doc_openthreads \ No newline at end of file
diff --git a/ports/osg/fix-liblas.patch b/ports/osg/fix-liblas.patch
new file mode 100644
index 000000000..c36396e97
--- /dev/null
+++ b/ports/osg/fix-liblas.patch
@@ -0,0 +1,16 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b84fa06..a991670 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -765,7 +765,10 @@ ELSE()
+ ENDIF()
+ FIND_PACKAGE(ZeroConf)
+
+- FIND_PACKAGE(LIBLAS)
++ FIND_PACKAGE(liblas CONFIG)
++ set(LIBLAS_FOUND ${liblas_FOUND})
++ set(LIBLAS_LIBRARY liblas)
++ set(LIBLASC_LIBRARY liblas_c)
+
+ IF (NOT(OSG_USE_LOCAL_LUA_SOURCE))
+ FIND_PACKAGE(Lua52)
diff --git a/ports/osg/fix-nvtt.patch b/ports/osg/fix-nvtt.patch
new file mode 100644
index 000000000..3cc1c4d58
--- /dev/null
+++ b/ports/osg/fix-nvtt.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a991670..5b530c5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -759,7 +759,9 @@ ELSE()
+ FIND_PACKAGE(RSVG)
+ FIND_PACKAGE(GtkGl)
+ FIND_PACKAGE(DirectInput)
++ if (ENABLE_NVTT)
+ FIND_PACKAGE(NVTT)
++ endif()
+ IF (NOT WIN32)
+ FIND_PACKAGE(Asio)
+ ENDIF()
diff --git a/ports/osg/fix-sdl.patch b/ports/osg/fix-sdl.patch
index fa092c784..e97d86476 100644
--- a/ports/osg/fix-sdl.patch
+++ b/ports/osg/fix-sdl.patch
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 81328ea..2566b48 100644
+index 81328ea..c735419 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -755,8 +755,6 @@ ELSE()
@@ -11,15 +11,14 @@ index 81328ea..2566b48 100644
FIND_PACKAGE(Poppler-glib)
FIND_PACKAGE(RSVG)
FIND_PACKAGE(GtkGl)
-@@ -775,6 +773,11 @@ ELSE()
+@@ -775,6 +773,10 @@ ELSE()
FIND_PACKAGE(Lua51)
ENDIF()
ENDIF()
+
+ find_package(SDL)
-+ if (NOT SDL_FOUND)
-+ find_package(SDL2)
-+ endif()
++ find_package(SDL2 CONFIG)
++ set(SDL2_LIBRARY SDL2::SDL2 SDL2::SDL2main)
# V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this.
# FIND_PACKAGE(V8)
diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake
index a4e3d7b73..00cd53538 100644
--- a/ports/osg/portfile.cmake
+++ b/ports/osg/portfile.cmake
@@ -14,6 +14,8 @@ vcpkg_from_github(
disable-present3d-staticview-in-linux.patch #Due to some link error we cannot solve yet, disable them in linux.
fix-curl.patch
remove-prefix.patch # Remove this patch when cmake fix Findosg_functions.cmake
+ fix-liblas.patch
+ fix-nvtt.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
@@ -42,16 +44,32 @@ list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GLIB=ON)
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON)
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=ON)
+# Due to nvtt CRT linkage error, we can only enable static builds here
+set(ENABLE_NVTT ON)
+if (VCPKG_TARGET_IS_WINDOWS AND OSG_DYNAMIC)
+ set(ENABLE_NVTT OFF)
+endif()
+list(APPEND OPTIONS -DENABLE_NVTT=${ENABLE_NVTT})
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ tools BUILD_OSG_APPLICATIONS
+ examples BUILD_OSG_EXAMPLES
+ plugins BUILD_OSG_PLUGINS
+ packages BUILD_OSG_PACKAGES
+ docs BUILD_DOCUMENTATION
+ docs BUILD_REF_DOCS_SEARCHENGINE
+ docs BUILD_REF_DOCS_TAGFILE
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
+ OPTIONS ${FEATURE_OPTIONS}
-DOSG_USE_UTF8_FILENAME=${OSG_USE_UTF8_FILENAME}
-DDYNAMIC_OPENSCENEGRAPH=${OSG_DYNAMIC}
-DDYNAMIC_OPENTHREADS=${OSG_DYNAMIC}
- -DBUILD_OSG_PLUGINS=ON # it should always be ON due to osgerath need this
- -DBUILD_OSG_EXAMPLES=ON
- -DBUILD_OSG_APPLICATIONS=ON
+ -DBUILD_DASHBOARD_REPORTS=OFF
-DCMAKE_CXX_STANDARD=11
+ ${OPTIONS}
)
vcpkg_install_cmake()
@@ -62,31 +80,53 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT})
-file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
-file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
-file(REMOVE_RECURSE ${OSG_TOOLS})
-file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
-file(REMOVE_RECURSE ${OSG_TOOLS_DBG})
+if (OSG_TOOLS)
+ file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
+ file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
+ file(REMOVE_RECURSE ${OSG_TOOLS})
+ file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
+ file(REMOVE_RECURSE ${OSG_TOOLS_DBG})
+endif()
+file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
+if (OSG_TOOLS)
+ file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph)
+endif()
+
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX})
- file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
- file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX})
- file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
+ file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*)
+ if (OSG_PLUGINS_DBG)
+ file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
+ endif()
+ file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*)
+ if (OSG_PLUGINS_REL)
+ if (NOT EXISTS ${OSG_TOOL_PATH})
+ file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
+ endif()
+ file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
+ endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/)
endif()
-file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
-file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
-file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/lib/osgPlugins-${OSG_VER}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
-file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/lib/osgPlugins-${OSG_VER}/)
+file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*)
+if (OSG_PLUGINS_DBG)
+ file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER})
+endif()
+
+file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*)
+if (OSG_PLUGINS_REL)
+ if (NOT EXISTS ${OSG_TOOL_PATH})
+ file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
+ endif()
+ file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER})
+endif()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/)
#Cleanup
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
diff --git a/ports/osgearth/CONTROL b/ports/osgearth/CONTROL
index d54992b82..74f1c5875 100644
--- a/ports/osgearth/CONTROL
+++ b/ports/osgearth/CONTROL
@@ -1,4 +1,4 @@
Source: osgearth
-Version: 2.10.2
+Version: 2.10.2-1
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
-Build-Depends: osg
+Build-Depends: osg[plugins]