early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

126
externals/vcpkg/ports/osg/collada.patch vendored Executable file
View File

@@ -0,0 +1,126 @@
diff --git a/CMakeModules/FindCOLLADA.cmake b/CMakeModules/FindCOLLADA.cmake
index 7c7d290..5b456d7 100644
--- a/CMakeModules/FindCOLLADA.cmake
+++ b/CMakeModules/FindCOLLADA.cmake
@@ -29,10 +29,7 @@ IF(APPLE)
ELSEIF(MINGW)
SET(COLLADA_BUILDNAME "mingw")
SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
-ELSEIF((MSVC_VERSION GREATER 1910) OR (MSVC_VERSION EQUAL 1910))
- SET(COLLADA_BUILDNAME "vc14")
- SET(COLLADA_BOOST_BUILDNAME "vc141")
-ELSEIF(MSVC_VERSION EQUAL 1900)
+ELSEIF(MSVC_VERSION GREATER_EQUAL 1900)
SET(COLLADA_BUILDNAME "vc14")
SET(COLLADA_BOOST_BUILDNAME "vc140")
ELSEIF(MSVC_VERSION EQUAL 1800)
@@ -61,6 +58,7 @@ ENDIF()
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
+ PATHS
${COLLADA_DOM_ROOT}/include
$ENV{COLLADA_DIR}/include
$ENV{COLLADA_DIR}
@@ -68,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
@@ -116,7 +106,7 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
)
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
- NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d collada-dom2.5-dp-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d
+ NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d collada-dom2.5-dp-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt
PATHS
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
${COLLADA_DOM_ROOT}
@@ -279,7 +269,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
- NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_63
+ NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_63 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -287,7 +277,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
- NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
+ NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -295,7 +285,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
- NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_63
+ NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_63 boost_system-${COLLADA_BOOST_BUILDNAME}-mt
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -303,7 +293,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
)
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
- NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
+ NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd
PATHS
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
@@ -329,5 +319,3 @@ IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
ENDIF()
ENDIF()
-
-
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)

View File

@@ -0,0 +1,36 @@
diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt
index ab491c6..bee3d1f 100644
--- a/applications/CMakeLists.txt
+++ b/applications/CMakeLists.txt
@@ -32,12 +32,16 @@ IF(DYNAMIC_OPENSCENEGRAPH)
ADD_SUBDIRECTORY(osgconv)
ADD_SUBDIRECTORY(osgfilecache)
ADD_SUBDIRECTORY(osgversion)
- ADD_SUBDIRECTORY(present3D)
+ if (NOT UNIX)
+ ADD_SUBDIRECTORY(present3D)
+ endif()
ELSE()
# need to define this on win32 or linker cries about _declspecs
ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ADD_SUBDIRECTORY(osgversion)
- ADD_SUBDIRECTORY(present3D)
+ if (NOT UNIX)
+ ADD_SUBDIRECTORY(present3D)
+ endif()
ENDIF()
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 788e507..3c550bc 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -245,7 +245,7 @@ ELSE(DYNAMIC_OPENSCENEGRAPH)
IF(OSG_BUILD_PLATFORM_IPHONE)
ADD_SUBDIRECTORY(osgviewerIPhone)
- ELSE()
+ ELSEIF (NOT UNIX)
ADD_SUBDIRECTORY(osgstaticviewer)
ENDIF()

18
externals/vcpkg/ports/osg/fix-curl.patch vendored Executable file
View File

@@ -0,0 +1,18 @@
diff --git a/src/osgPlugins/curl/CMakeLists.txt b/src/osgPlugins/curl/CMakeLists.txt
index cc459ff..370dbec 100644
--- a/src/osgPlugins/curl/CMakeLists.txt
+++ b/src/osgPlugins/curl/CMakeLists.txt
@@ -23,11 +23,11 @@ SET(TARGET_H
IF(ZLIB_FOUND)
SET(TARGET_LIBRARIES_VARS
- CURL_LIBRARY
+ CURL_LIBRARIES
ZLIB_LIBRARIES)
ELSE()
SET(TARGET_LIBRARIES_VARS
- CURL_LIBRARY)
+ CURL_LIBRARIES)
ENDIF()
IF(WIN32 OR MINGW)

View File

@@ -0,0 +1,29 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 798b8b9..c975d78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -740,7 +740,7 @@ ELSE()
# Common to all platforms except android:
FIND_PACKAGE(Freetype)
FIND_PACKAGE(ilmbase)
- FIND_PACKAGE(Inventor)
+ FIND_PACKAGE(coin CONFIG)
FIND_PACKAGE(Jasper)
FIND_PACKAGE(OpenEXR)
FIND_PACKAGE(OpenCascade)
diff --git a/src/osgPlugins/Inventor/CMakeLists.txt b/src/osgPlugins/Inventor/CMakeLists.txt
index 963a494..e34b6b8 100644
--- a/src/osgPlugins/Inventor/CMakeLists.txt
+++ b/src/osgPlugins/Inventor/CMakeLists.txt
@@ -17,10 +17,6 @@ SET(TARGET_HDRS
ShuttleCallback.h
)
-ADD_DEFINITIONS(-DCOIN_DLL)
-
-INCLUDE_DIRECTORIES(${INVENTOR_INCLUDE_DIR})
-
-SET(TARGET_ADDED_LIBRARIES ${INVENTOR_LIBRARY})
+SET(TARGET_ADDED_LIBRARIES Coin::Coin)
SETUP_PLUGIN(iv iv)

View File

@@ -0,0 +1,34 @@
diff --git a/applications/present3D/CMakeLists.txt b/applications/present3D/CMakeLists.txt
index df859d0..123313a 100644
--- a/applications/present3D/CMakeLists.txt
+++ b/applications/present3D/CMakeLists.txt
@@ -103,6 +103,11 @@ ENDIF()
IF (WIN32)
# to support cluster code
SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32)
+
+ find_package(EXPAT REQUIRED)
+ find_package(Iconv REQUIRED)
+
+ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT Iconv::Iconv)
ELSE()
CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" LIB_NSL_HAS_GETHOSTBYNAME)
IF(LIB_NSL_HAS_GETHOSTBYNAME)
diff --git a/examples/osgstaticviewer/CMakeLists.txt b/examples/osgstaticviewer/CMakeLists.txt
index 071ab26..bf8d85f 100644
--- a/examples/osgstaticviewer/CMakeLists.txt
+++ b/examples/osgstaticviewer/CMakeLists.txt
@@ -19,6 +19,13 @@ IF(FREETYPE_FOUND)
SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_freetype)
ENDIF(FREETYPE_FOUND)
+IF (WIN32)
+ find_package(EXPAT REQUIRED)
+ find_package(Iconv REQUIRED)
+
+ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT Iconv::Iconv)
+ENDIF()
+
SET(TARGET_SRC osgstaticviewer.cpp )
#### end var setup ###
SETUP_EXAMPLE(osgstaticviewer)

16
externals/vcpkg/ports/osg/fix-liblas.patch vendored Executable file
View File

@@ -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)

14
externals/vcpkg/ports/osg/fix-nvtt.patch vendored Executable file
View File

@@ -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()

37
externals/vcpkg/ports/osg/fix-sdl.patch vendored Executable file
View File

@@ -0,0 +1,37 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 81328ea..c735419 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -755,8 +755,6 @@ ELSE()
FIND_PACKAGE(GStreamer COMPONENTS app pbutils)
FIND_PACKAGE(GLIB COMPONENTS gobject)
FIND_PACKAGE(DirectShow)
- FIND_PACKAGE(SDL2)
- FIND_PACKAGE(SDL)
FIND_PACKAGE(Poppler-glib)
FIND_PACKAGE(RSVG)
FIND_PACKAGE(GtkGl)
@@ -775,6 +773,10 @@ ELSE()
FIND_PACKAGE(Lua51)
ENDIF()
ENDIF()
+
+ find_package(SDL)
+ 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/examples/osgmovie/osgmovie.cpp b/examples/osgmovie/osgmovie.cpp
index 9de15b1..ae96e11 100644
--- a/examples/osgmovie/osgmovie.cpp
+++ b/examples/osgmovie/osgmovie.cpp
@@ -691,7 +691,7 @@ int main(int argc, char** argv)
#if USE_SDL || USE_SDL2
-#include "SDL.h"
+#include <SDL/SDL.h>
static void soundReadCallback(void * user_data, uint8_t * data, int datalen)
{

View File

@@ -0,0 +1,52 @@
From bee432e701c541f9a86bd051b795c3e056e36646 Mon Sep 17 00:00:00 2001
From: Ankur Verma <ankurv@localhost.localdomain>
Date: Sun, 16 Aug 2020 14:36:31 -0700
Subject: [PATCH] osg
---
src/osgPlugins/zip/unzip.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp
index 0bec28f0c..74e7b2413 100644
--- a/src/osgPlugins/zip/unzip.cpp
+++ b/src/osgPlugins/zip/unzip.cpp
@@ -1742,8 +1742,8 @@ int inflate_blocks_free(inflate_blocks_statef *s, z_streamp z)
-extern const char inflate_copyright[] =
- " inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
+//extern const char inflate_copyright[] =
+// " inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
// If you use the zlib library in a product, an acknowledgment is welcome
// in the documentation of your product. If for some reason you cannot
// include such an acknowledgment, I would appreciate that you keep this
--
2.26.2
From 24d4036036884b350bd6c519b64626faa2c7e660 Mon Sep 17 00:00:00 2001
From: Ankur Verma <ankurv@localhost.localdomain>
Date: Thu, 20 Aug 2020 23:16:12 -0700
Subject: [PATCH] Symbol clashes
---
src/osgPlugins/zip/unzip.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/osgPlugins/zip/unzip.cpp b/src/osgPlugins/zip/unzip.cpp
index 74e7b2413..f5169c6f4 100644
--- a/src/osgPlugins/zip/unzip.cpp
+++ b/src/osgPlugins/zip/unzip.cpp
@@ -213,7 +213,7 @@ DWORD GetFilePosU(HANDLE hfout)
return ftell(hfout);
}
-bool FileExists(const TCHAR *fn)
+static bool FileExists(const TCHAR *fn)
{ struct stat st;
int res=stat(fn,&st);
return (res==0);
--
2.26.2

173
externals/vcpkg/ports/osg/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,173 @@
set(OSG_VER 3.6.5)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openscenegraph/OpenSceneGraph
REF OpenSceneGraph-${OSG_VER}
SHA512 7002fa30a3bcf6551d2e1050b4ca75a3736013fd190e4f50953717406864da1952deb09f530bc8c5ddf6e4b90204baec7dbc283f497829846d46d561f66feb4b
HEAD_REF master
PATCHES
collada.patch
static.patch
fix-sdl.patch
fix-example-application.patch
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
use-boost-asio.patch
fix-dependency-coin.patch
osgdb_zip_nozip.patch # This is fix symbol clashes with other libs when built in static-lib mode
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(OSG_DYNAMIC OFF)
else()
set(OSG_DYNAMIC ON)
endif()
file(REMOVE ${SOURCE_PATH}/CMakeModules/FindSDL2.cmake)
set(OSG_USE_UTF8_FILENAME ON)
if (NOT VCPKG_TARGET_IS_WINDOWS)
message("Build osg requires gcc with version higher than 4.7.")
# Enable OSG_USE_UTF8_FILENAME will call some windows-only functions.
set(OSG_USE_UTF8_FILENAME OFF)
endif()
set(OPTIONS)
if(NOT "collada" IN_LIST FEATURES)
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_COLLADA=ON)
endif()
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=ON)
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_DCMTK=ON)
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GStreamer=ON)
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})
if (VCPKG_TARGET_IS_WINDOWS)
list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=ON)
list(APPEND OPTIONS -DOSG_TEXT_USE_FONTCONFIG=OFF)
endif()
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
)
set(BUILD_OSG_PLUGIN_RESTHTTPDEVICE ON)
if(VCPKG_TARGET_IS_WINDOWS)
set(BUILD_OSG_PLUGIN_RESTHTTPDEVICE OFF)
endif()
# The package osg can be configured to use different OpenGL profiles via a custom triplet file:
# Possible values are GLCORE, GL2, GL3, GLES1, GLES2, GLES3, and GLES2+GLES3
if(NOT DEFINED osg_OPENGL_PROFILE)
set(osg_OPENGL_PROFILE "GL3")
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS ${FEATURE_OPTIONS}
-DOSG_USE_UTF8_FILENAME=${OSG_USE_UTF8_FILENAME}
-DDYNAMIC_OPENSCENEGRAPH=${OSG_DYNAMIC}
-DDYNAMIC_OPENTHREADS=${OSG_DYNAMIC}
-DBUILD_OSG_PLUGIN_DICOM=OFF
-DBUILD_OSG_PLUGIN_OPENCASCADE=OFF
-DBUILD_OSG_PLUGIN_INVENTOR=OFF
-DBUILD_OSG_PLUGIN_FBX=OFF
-DBUILD_OSG_PLUGIN_DIRECTSHOW=OFF
-DBUILD_OSG_PLUGIN_QTKIT=OFF
-DBUILD_OSG_PLUGIN_SVG=OFF
-DBUILD_OSG_PLUGIN_VNC=OFF
-DBUILD_OSG_PLUGIN_LUA=OFF
-DOPENGL_PROFILE=${osg_OPENGL_PROFILE}
-DBUILD_OSG_PLUGIN_RESTHTTPDEVICE=${BUILD_OSG_PLUGIN_RESTHTTPDEVICE}
-DBUILD_OSG_PLUGIN_ZEROCONFDEVICE=OFF
-DBUILD_DASHBOARD_REPORTS=OFF
-DCMAKE_CXX_STANDARD=11
${OPTIONS}
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# handle osg tools and plugins
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT})
file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
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}/*)
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/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)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
vcpkg_fixup_pkgconfig()
# Handle usage
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

26
externals/vcpkg/ports/osg/remove-prefix.patch vendored Executable file
View File

@@ -0,0 +1,26 @@
diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake
index bb3be63..356edcd 100644
--- a/CMakeModules/ModuleInstall.cmake
+++ b/CMakeModules/ModuleInstall.cmake
@@ -21,7 +21,7 @@ SOURCE_GROUP(
FILES ${TARGET_H}
)
-IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
+IF(0)
HANDLE_MSVC_DLL()
ENDIF()
diff --git a/src/OpenThreads/win32/CMakeLists.txt b/src/OpenThreads/win32/CMakeLists.txt
index 84550bd..0e816f7 100644
--- a/src/OpenThreads/win32/CMakeLists.txt
+++ b/src/OpenThreads/win32/CMakeLists.txt
@@ -39,7 +39,7 @@ LINK_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
)
-IF(MSVC AND OSG_MSVC_VERSIONED_DLL)
+IF(0)
HANDLE_MSVC_DLL(ot ${OPENTHREADS_SOVERSION})
ENDIF()

7
externals/vcpkg/ports/osg/static.patch vendored Executable file
View File

@@ -0,0 +1,7 @@
--- a/src/osgPlugins/curl/CMakeLists.txt
+++ b/src/osgPlugins/curl/CMakeLists.txt
@@ -35,3 +35,3 @@
ADD_DEFINITIONS(-DCURL_STATICLIB)
- SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32)
+ SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32 crypt32)
ENDIF()

4
externals/vcpkg/ports/osg/usage vendored Executable file
View File

@@ -0,0 +1,4 @@
The package osg can be configured to use different OpenGL profiles via a custom triplet file.
Possible values are GLCORE, GL2, GL3, GLES1, GLES2, GLES3 and GLES2+GLES3.
The default value is GL3.
set(osg_OPENGL_PROFILE GL2)

View File

@@ -0,0 +1,92 @@
diff --git a/CMakeModules/FindAsio.cmake b/CMakeModules/FindAsio.cmake
index 433d5c7..04a0edf 100644
--- a/CMakeModules/FindAsio.cmake
+++ b/CMakeModules/FindAsio.cmake
@@ -1,22 +1,7 @@
# Locate ASIO-headers (http://think-async.com/Asio)
-# This module defines
-# ASIO_FOUND, if false, do not try to link to gdal
-# ASIO_INCLUDE_DIR, where to find the headers
-#
# Created by Stephan Maximilian Huber
-FIND_PATH(ASIO_INCLUDE_DIR
- NAMES
- asio.hpp
- PATHS
- /usr/include
- /usr/local/include
-)
-
-SET(ASIO_FOUND "NO")
-IF(ASIO_INCLUDE_DIR)
- FIND_PACKAGE( Boost 1.37 )
- IF(Boost_FOUND)
- SET(ASIO_FOUND "YES")
- ENDIF()
+FIND_PACKAGE( Boost 1.37 COMPONENTS asio )
+IF(Boost_FOUND)
+ SET(ASIO_FOUND "YES")
ENDIF()
diff --git a/src/osgPlugins/RestHttpDevice/CMakeLists.txt b/src/osgPlugins/RestHttpDevice/CMakeLists.txt
index 8464b9d..073e8ed 100644
--- a/src/osgPlugins/RestHttpDevice/CMakeLists.txt
+++ b/src/osgPlugins/RestHttpDevice/CMakeLists.txt
@@ -1,5 +1,4 @@
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
-INCLUDE_DIRECTORIES(${ASIO_INCLUDE_DIR})
SET(TARGET_SRC
connection.cpp
diff --git a/src/osgPlugins/RestHttpDevice/connection.hpp b/src/osgPlugins/RestHttpDevice/connection.hpp
index 99f3a93..b205759 100644
--- a/src/osgPlugins/RestHttpDevice/connection.hpp
+++ b/src/osgPlugins/RestHttpDevice/connection.hpp
@@ -11,7 +11,7 @@
#ifndef HTTP_SERVER_CONNECTION_HPP
#define HTTP_SERVER_CONNECTION_HPP
-#include <asio.hpp>
+#include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
diff --git a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp
index 1d363a8..b6e7195 100644
--- a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp
+++ b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp
@@ -11,7 +11,7 @@
#ifndef HTTP_SERVER_IO_SERVICE_POOL_HPP
#define HTTP_SERVER_IO_SERVICE_POOL_HPP
-#include <asio.hpp>
+#include <boost/asio.hpp>
#include <vector>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
diff --git a/src/osgPlugins/RestHttpDevice/reply.hpp b/src/osgPlugins/RestHttpDevice/reply.hpp
index 89f264a..b63d0b9 100644
--- a/src/osgPlugins/RestHttpDevice/reply.hpp
+++ b/src/osgPlugins/RestHttpDevice/reply.hpp
@@ -13,7 +13,7 @@
#include <string>
#include <vector>
-#include <asio.hpp>
+#include <boost/asio.hpp>
#include "header.hpp"
namespace http {
diff --git a/src/osgPlugins/RestHttpDevice/server.hpp b/src/osgPlugins/RestHttpDevice/server.hpp
index a14f263..91c4b62 100644
--- a/src/osgPlugins/RestHttpDevice/server.hpp
+++ b/src/osgPlugins/RestHttpDevice/server.hpp
@@ -11,7 +11,7 @@
#ifndef HTTP_SERVER_SERVER_HPP
#define HTTP_SERVER_SERVER_HPP
-#include <asio.hpp>
+#include <boost/asio.hpp>
#include <string>
#include <vector>
#include <boost/noncopyable.hpp>

125
externals/vcpkg/ports/osg/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,125 @@
{
"name": "osg",
"version": "3.6.5",
"port-version": 12,
"description": "The OpenSceneGraph is an open source high performance 3D graphics toolkit.",
"homepage": "https://github.com/openscenegraph/OpenSceneGraph",
"dependencies": [
{
"name": "expat",
"platform": "windows"
},
{
"name": "fontconfig",
"platform": "!windows"
},
"opengl-registry",
{
"name": "openimageio",
"platform": "osx"
},
"zlib"
],
"features": {
"collada": {
"description": "Support for Collada (.dae) files",
"dependencies": [
"collada-dom"
]
},
"docs": {
"description": "Build OpenSceneGraph reference documentation using doxygen (use: make doc_openscenegraph doc_openthreads"
},
"examples": {
"description": "Enable to build OSG Examples",
"dependencies": [
"freetype",
{
"name": "libiconv",
"platform": "windows"
},
"sdl1",
"sdl2"
]
},
"packages": {
"description": "Set to ON to generate CPack configuration files and packaging targets"
},
"plugins": {
"description": "Build OSG Plugins - Disable for compile testing examples on a time limit",
"dependencies": [
{
"name": "boost-asio",
"platform": "!windows"
},
{
"name": "boost-bind",
"platform": "!windows"
},
{
"name": "boost-core",
"platform": "!windows"
},
{
"name": "boost-lexical-cast",
"platform": "!windows"
},
{
"name": "boost-logic",
"platform": "!windows"
},
{
"name": "boost-smart-ptr",
"platform": "!windows"
},
{
"name": "boost-tuple",
"platform": "!windows"
},
"coin",
"curl",
"freetype",
"gdal",
{
"name": "giflib",
"platform": "windows"
},
"ilmbase",
"jasper",
"libgta",
{
"name": "libiconv",
"platform": "windows"
},
"libjpeg-turbo",
"liblas",
"libpng",
{
"name": "libxml2",
"platform": "windows"
},
{
"name": "nvtt",
"platform": "!x86"
},
"openexr",
"sdl1",
"tiff"
]
},
"tools": {
"description": "Enable to build OSG Applications (e.g. osgviewer)",
"dependencies": [
"curl",
"freetype",
{
"name": "libiconv",
"platform": "windows"
},
"libjpeg-turbo",
"libpng",
"sdl1"
]
}
}
}