aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankurverma85 <31362771+ankurverma85@users.noreply.github.com>2021-03-25 13:28:42 -0700
committerGitHub <noreply@github.com>2021-03-25 13:28:42 -0700
commit5a10163c44526b5d42a67480ce7a692a36948761 (patch)
treec62543931827cad6fddf592e41b05a162cdd075e
parentc2e1d32c25c77a258e103e00d778f6d935b44e73 (diff)
downloadvcpkg-5a10163c44526b5d42a67480ce7a692a36948761.tar.gz
vcpkg-5a10163c44526b5d42a67480ce7a692a36948761.zip
[osgearth] Fix x64-windows-static-md (#15375)
* osgearth:x64-windows-static-md fixes * Try to build for x64-windows-static-md * Fix builds * Indent and combine blocks * overwrite version * merge with master and update version * revert incorrect version changes * [osgearth] Improve portfile.cmake, add feature tools * update version record * disable fontconfig on windows * update version * [osgearth] Fix dependencies * [osgearth] Re-fix dependencies * [osgearth] Fix the sequence of linking osg * [osgearth] Fix dependency osg * update version record * Fix osgearth:x64-linux * x64-windows-static-md fixes * Fix x64-linux * Build fixes * Update x-add-version Co-authored-by: ankurv <ankurv@microsoft.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
-rw-r--r--ports/osg/CONTROL2
-rw-r--r--ports/osg/portfile.cmake5
-rw-r--r--ports/osgearth/StaticOSG.patch84
-rw-r--r--ports/osgearth/deprecated_cpp_fix.patch28
-rw-r--r--ports/osgearth/fix-dependencies.patch67
-rw-r--r--ports/osgearth/fix-dependency-osg.patch171
-rw-r--r--ports/osgearth/fix-tinyxml.patch15
-rw-r--r--ports/osgearth/portfile.cmake84
-rw-r--r--ports/osgearth/remove-tool-debug-suffix.patch13
-rw-r--r--ports/osgearth/vcpkg.json14
-rw-r--r--versions/baseline.json4
-rw-r--r--versions/o-/osg.json5
-rw-r--r--versions/o-/osgearth.json5
13 files changed, 442 insertions, 55 deletions
diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL
index 8d453c36c..a05f5abe7 100644
--- a/ports/osg/CONTROL
+++ b/ports/osg/CONTROL
@@ -1,6 +1,6 @@
Source: osg
Version: 3.6.5
-Port-Version: 6
+Port-Version: 7
Homepage: https://github.com/openscenegraph/OpenSceneGraph
Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit.
Build-Depends: zlib, fontconfig (!windows), expat (windows), openimageio (osx)
diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake
index eaa94c2dd..b8aeaa712 100644
--- a/ports/osg/portfile.cmake
+++ b/ports/osg/portfile.cmake
@@ -54,6 +54,11 @@ if (VCPKG_TARGET_IS_WINDOWS AND OSG_DYNAMIC)
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
diff --git a/ports/osgearth/StaticOSG.patch b/ports/osgearth/StaticOSG.patch
new file mode 100644
index 000000000..2f4b1bff1
--- /dev/null
+++ b/ports/osgearth/StaticOSG.patch
@@ -0,0 +1,84 @@
+From 4e719ceacdc8df729f3296f62c9f50075c862967 Mon Sep 17 00:00:00 2001
+From: Ankur Verma <ankur.verma@outlook.com>
+Date: Sun, 27 Dec 2020 22:26:32 -0800
+Subject: [PATCH] StaticOSG
+
+---
+ CMakeLists.txt | 9 ++++++
+ CMakeModules/FindGEOS.cmake | 29 +++++++++++++++++++++++++++--
+ 2 files changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 049e37e..d75a3b9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -266,6 +266,15 @@ ELSE()
+ SET(OSGEARTH_DYNAMIC_OR_STATIC "STATIC")
+ ENDIF()
+
++IF(NOT OSGEARTH_BUILD_SHARED_LIBS)
++ ADD_DEFINITIONS(-DOSGEARTH_LIBRARY_STATIC)
++ENDIF()
++
++OPTION(OSG_IS_STATIC "Set to ON to build OSG for static linking. Use OFF for dynamic." OFF)
++IF (OSG_IS_STATIC)
++ ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
++ LINK_LIBRARIES(${CMAKE_DL_LIBS})
++ENDIF(OSG_IS_STATIC)
+
+ # OE Libraries
+ ADD_SUBDIRECTORY(src)
+diff --git a/CMakeModules/FindGEOS.cmake b/CMakeModules/FindGEOS.cmake
+index e85f922..b1bbfed 100644
+--- a/CMakeModules/FindGEOS.cmake
++++ b/CMakeModules/FindGEOS.cmake
+@@ -65,7 +65,7 @@ FIND_LIBRARY(GEOS_LIBRARY
+ )
+
+ FIND_LIBRARY(GEOS_LIBRARY_DEBUG
+- NAMES geos_cd geos_i_d geosd
++ NAMES geos_cd geos_i_d
+ PATHS
+ ${GEOS_DIR}/lib
+ $ENV{GEOS_DIR}
+@@ -74,7 +74,7 @@ FIND_LIBRARY(GEOS_LIBRARY_DEBUG
+ )
+
+ FIND_LIBRARY(GEOS_LIBRARY_DEBUG
+- NAMES geos_cd geos_i_d geosd
++ NAMES geos_cd geos_i_d
+ PATHS
+ ~/Library/Frameworks
+ /Library/Frameworks
+@@ -92,3 +92,28 @@ SET(GEOS_FOUND "NO")
+ IF(GEOS_LIBRARY AND GEOS_INCLUDE_DIR)
+ SET(GEOS_FOUND "YES")
+ ENDIF(GEOS_LIBRARY AND GEOS_INCLUDE_DIR)
++
++OPTION(GEOS_IS_STATIC "Set to ON to build GEOS for static linking. Use OFF for dynamic." OFF)
++IF (GEOS_IS_STATIC)
++ FIND_LIBRARY(GEOS_CXX_LIBRARY
++ NAMES geos
++ PATHS
++ ${GEOS_DIR}/lib
++ $ENV{GEOS_DIR}
++ NO_DEFAULT_PATH
++ PATH_SUFFIXES lib64 lib
++ )
++
++ FIND_LIBRARY(GEOS_CXX_LIBRARY_DEBUG
++ NAMES geosd
++ PATHS
++ ${GEOS_DIR}/lib
++ $ENV{GEOS_DIR}
++ NO_DEFAULT_PATH
++ PATH_SUFFIXES lib64 lib
++ )
++
++ set(GEOS_LIBRARY "${GEOS_LIBRARY};${GEOS_CXX_LIBRARY}" CACHE STRING "Geos Libraries" FORCE )
++ set(GEOS_LIBRARY_DEBUG "${GEOS_LIBRARY_DEBUG};${GEOS_CXX_LIBRARY_DEBUG}" CACHE STRING "Geos Debug Libraries" FORCE )
++
++ENDIF(GEOS_IS_STATIC)
+--
+2.29.2
+
diff --git a/ports/osgearth/deprecated_cpp_fix.patch b/ports/osgearth/deprecated_cpp_fix.patch
new file mode 100644
index 000000000..7a5604198
--- /dev/null
+++ b/ports/osgearth/deprecated_cpp_fix.patch
@@ -0,0 +1,28 @@
+From 89bea8378ae632b0caa134293f713b927774ab50 Mon Sep 17 00:00:00 2001
+From: ankurv <ankurv@microsoft.com>
+Date: Sun, 3 Jan 2021 11:05:32 -0800
+Subject: [PATCH] Patch
+
+---
+ src/osgEarth/Threading | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/osgEarth/Threading b/src/osgEarth/Threading
+index 9093ca6..0fbd9ce 100644
+--- a/src/osgEarth/Threading
++++ b/src/osgEarth/Threading
+@@ -602,7 +602,11 @@ namespace osgEarth { namespace Threading
+ template<typename Fn, typename... Args>
+ constexpr auto cpp11invoke(Fn&& f, Args&&... args)
+ noexcept(noexcept(std::forward<Fn>(f)(std::forward<Args>(args)...)))
++#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703
++ -> typename std::invoke_result<Fn(Args...)>::type
++#else
+ -> typename std::result_of<Fn(Args...)>::type
++#endif
+ {
+ return std::forward<Fn>(f)(std::forward<Args>(args)...);
+ }
+--
+2.29.2.windows.3
+
diff --git a/ports/osgearth/fix-dependencies.patch b/ports/osgearth/fix-dependencies.patch
new file mode 100644
index 000000000..54c414875
--- /dev/null
+++ b/ports/osgearth/fix-dependencies.patch
@@ -0,0 +1,67 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 001ebf1..8e49af2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -128,24 +128,45 @@ ENDIF (OSGEARTH_USE_GLES)
+
+ # required
+ find_package(OSG REQUIRED)
+-find_package(CURL REQUIRED)
++find_package(CURL CONFIG REQUIRED)
++set(CURL_LIBRARY CURL::libcurl)
++
+ find_package(GDAL REQUIRED)
++set(GDAL_LIBRARY ${GDAL_LIBRARIES})
++set(GDAL_FOUND 1)
+
+ # optional
+-find_package(GEOS REQUIRED)
+-find_package(Sqlite3 REQUIRED)
++find_package(geos CONFIG REQUIRED)
++set(GEOS_LIBRARY GEOS::geos GEOS::geos_c)
++set(GEOS_FOUND 1)
++
++find_package(unofficial-sqlite3 CONFIG REQUIRED)
++set(SQLITE3_FOUND 1)
++set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3)
++
+ find_package(Draco REQUIRED)
+ find_package(BASISU REQUIRED)
++
+ find_package(GLEW REQUIRED)
+-find_package(Protobuf REQUIRED)
+-find_package(WEBP REQUIRED)
++set(GLEW_LIBRARIES GLEW::GLEW)
++set(GLEW_FOUND 1)
++
++find_package(protobuf CONFIG REQUIRED)
++set(Protobuf_LIBRARIES protobuf::libprotoc protobuf::libprotobuf)
++set(Protobuf_FOUND 1)
++
++find_package(WebP CONFIG REQUIRED)
++set(WEBP_LIBRARY WebP::webp)
++set(WEBP_FOUND 1)
+
+ if(OSGEARTH_ENABLE_PROFILING)
+ find_package(Tracy REQUIRED)
+ endif()
+
+ if(OSGEARTH_BUILD_ZIP_PLUGIN)
+- find_package(LIBZIP REQUIRED)
++ find_package(libzip CONFIG REQUIRED)
++ set(LIBZIP_LIBRARY libzip::zip)
++ set(LIBZIP_FOUND 1)
+ endif()
+
+ if(OSGEARTH_BUILD_TRITON_NODEKIT)
+@@ -193,7 +214,9 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak
+ # TinyXML is an XML parsing library
+ SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML")
+ IF (WITH_EXTERNAL_TINYXML)
+- find_package(TinyXML REQUIRED)
++ find_package(tinyxml CONFIG REQUIRED)
++ set(TINYXML_FOUND 1)
++ set(TINYXML_LIBRARY unofficial-tinyxml::unofficial-tinyxml)
+ ENDIF (WITH_EXTERNAL_TINYXML)
+
+ # postfix settings for various configs
diff --git a/ports/osgearth/fix-dependency-osg.patch b/ports/osgearth/fix-dependency-osg.patch
new file mode 100644
index 000000000..b6d00a06f
--- /dev/null
+++ b/ports/osgearth/fix-dependency-osg.patch
@@ -0,0 +1,171 @@
+diff --git a/CMakeModules/FindOSG.cmake b/CMakeModules/FindOSG.cmake
+index b7dff11..d1ec2ff 100644
+--- a/CMakeModules/FindOSG.cmake
++++ b/CMakeModules/FindOSG.cmake
+@@ -121,5 +121,36 @@ IF( OSG_LIBRARY AND OSG_INCLUDE_DIR )
+ SET( OSG_FOUND "YES" )
+ SET( OSG_INCLUDE_DIRS ${OSG_INCLUDE_DIR} ${OSG_GEN_INCLUDE_DIR} )
+ GET_FILENAME_COMPONENT( OSG_LIBRARIES_DIR ${OSG_LIBRARY} PATH )
++
++ find_package(ZLIB REQUIRED)
++ set(ZLIB_LIBRARY ZLIB::ZLIB)
++
++ find_package(Freetype REQUIRED)
++ set(FREETYPE_LIBRARY Freetype::Freetype)
++
++ find_package(unofficial-brotli CONFIG REQUIRED)
++ find_package(BZip2 REQUIRED)
++ find_package(expat CONFIG REQUIRED)
++ find_package(PNG REQUIRED)
++ find_package(JPEG REQUIRED)
++ find_package(TIFF REQUIRED)
++ find_package(zstd REQUIRED)
++ find_package(GIF REQUIRED)
++
++ if (UNIX)
++ list(APPEND OSG_DEPENDS_LIBRARY ${OSG_DEPENDS_LIBRARY} -pthread)
++ # Due to Linux Linker dependency issues these need to included again
++ set(DEPEND_LIB_LIST fontconfig freetype uuid gdal json-c expat zstd proj sqlite3 webp gif cfitsio)
++ else(UNIX)
++ set(DEPEND_LIB_LIST cfitsio)
++ endif()
++ foreach (libname ${DEPEND_LIB_LIST})
++ find_library(${libname}_LIBRARY_RELEASE NAMES ${libname} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED)
++ find_library(${libname}_LIBRARY_DEBUG NAMES ${libname} ${libname}d ${libname}_d NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
++ select_library_configurations(${libname})
++ list(APPEND OSG_DEPENDS_LIBRARY ${${libname}_LIBRARY})
++ endforeach()
++ list(APPEND OSG_DEPENDS_LIBRARY ZLIB::ZLIB Freetype::Freetype expat::expat PNG::PNG JPEG::JPEG TIFF::TIFF ${GIF_LIBRARIES} ${CFITSIO_LIBRARY})
++
+ ENDIF( OSG_LIBRARY AND OSG_INCLUDE_DIR )
+
+diff --git a/src/applications/osgearth_3pv/CMakeLists.txt b/src/applications/osgearth_3pv/CMakeLists.txt
+index e1dc876..6d688ff 100644
+--- a/src/applications/osgearth_3pv/CMakeLists.txt
++++ b/src/applications/osgearth_3pv/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_3pv.cpp )
+
+diff --git a/src/applications/osgearth_atlas/CMakeLists.txt b/src/applications/osgearth_atlas/CMakeLists.txt
+index aadbb5e..69698c7 100644
+--- a/src/applications/osgearth_atlas/CMakeLists.txt
++++ b/src/applications/osgearth_atlas/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_atlas.cpp )
+
+diff --git a/src/applications/osgearth_boundarygen/CMakeLists.txt b/src/applications/osgearth_boundarygen/CMakeLists.txt
+index fe9ec6b..52915b0 100644
+--- a/src/applications/osgearth_boundarygen/CMakeLists.txt
++++ b/src/applications/osgearth_boundarygen/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_H
+ BoundaryUtil
+diff --git a/src/applications/osgearth_clamp/CMakeLists.txt b/src/applications/osgearth_clamp/CMakeLists.txt
+index 996ea43..728ee77 100644
+--- a/src/applications/osgearth_clamp/CMakeLists.txt
++++ b/src/applications/osgearth_clamp/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_clamp.cpp)
+
+diff --git a/src/applications/osgearth_conv/CMakeLists.txt b/src/applications/osgearth_conv/CMakeLists.txt
+index a77d703..2aac5f2 100644
+--- a/src/applications/osgearth_conv/CMakeLists.txt
++++ b/src/applications/osgearth_conv/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_conv.cpp )
+
+diff --git a/src/applications/osgearth_overlayviewer/CMakeLists.txt b/src/applications/osgearth_overlayviewer/CMakeLists.txt
+index bb2802a..5175cfc 100644
+--- a/src/applications/osgearth_overlayviewer/CMakeLists.txt
++++ b/src/applications/osgearth_overlayviewer/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_overlayviewer.cpp )
+
+diff --git a/src/applications/osgearth_tfs/CMakeLists.txt b/src/applications/osgearth_tfs/CMakeLists.txt
+index 90c153a..d331019 100644
+--- a/src/applications/osgearth_tfs/CMakeLists.txt
++++ b/src/applications/osgearth_tfs/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_tfs.cpp )
+
+diff --git a/src/applications/osgearth_toc/CMakeLists.txt b/src/applications/osgearth_toc/CMakeLists.txt
+index b32c523..7b25b79 100644
+--- a/src/applications/osgearth_toc/CMakeLists.txt
++++ b/src/applications/osgearth_toc/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY OSGWIDGET_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGWIDGET_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_toc.cpp )
+
+diff --git a/src/applications/osgearth_version/CMakeLists.txt b/src/applications/osgearth_version/CMakeLists.txt
+index 1f1d48d..01e963b 100644
+--- a/src/applications/osgearth_version/CMakeLists.txt
++++ b/src/applications/osgearth_version/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_version.cpp )
+
+diff --git a/src/applications/osgearth_viewer/CMakeLists.txt b/src/applications/osgearth_viewer/CMakeLists.txt
+index 8c61e42..bbda7be 100644
+--- a/src/applications/osgearth_viewer/CMakeLists.txt
++++ b/src/applications/osgearth_viewer/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ INCLUDE_DIRECTORIES(${OSG_INCLUDE_DIRS} )
+-SET(TARGET_LIBRARIES_VARS OSG_LIBRARY OSGDB_LIBRARY OSGUTIL_LIBRARY OSGVIEWER_LIBRARY OPENTHREADS_LIBRARY)
++SET(TARGET_LIBRARIES_VARS OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY OPENTHREADS_LIBRARY)
+
+ SET(TARGET_SRC osgearth_viewer.cpp )
+
+diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt
+index c49bfcd..a7b9a2d 100644
+--- a/src/osgEarth/CMakeLists.txt
++++ b/src/osgEarth/CMakeLists.txt
+@@ -870,9 +870,11 @@ ENDIF(TRACY_FOUND)
+
+ OPTION(NRL_STATIC_LIBRARIES "Link osgEarth against static GDAL and cURL, including static OpenSSL, Proj4, JPEG, PNG, and TIFF." OFF)
+ if(NOT NRL_STATIC_LIBRARIES)
+- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY)
++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY)
++ TARGET_LINK_LIBRARIES(${LIB_NAME} ${OSG_DEPENDS_LIBRARY} ${CURL_LIBRARY} ${GDAL_LIBRARIES})
+ else(NOT NRL_STATIC_LIBRARIES)
+- LINK_WITH_VARIABLES(${LIB_NAME} OSG_LIBRARY OSGUTIL_LIBRARY OSGSIM_LIBRARY OSGDB_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY CURL_LIBRARY GDAL_LIBRARY OSGMANIPULATOR_LIBRARY SSL_EAY_RELEASE LIB_EAY_RELEASE TIFF_LIBRARY PROJ4_LIBRARY PNG_LIBRARY JPEG_LIBRARY)
++ LINK_WITH_VARIABLES(${LIB_NAME} OSGSIM_LIBRARY OSGVIEWER_LIBRARY OSGTEXT_LIBRARY OSGDB_LIBRARY OSGGA_LIBRARY OSGSHADOW_LIBRARY OPENTHREADS_LIBRARY OSGMANIPULATOR_LIBRARY OSGUTIL_LIBRARY OSG_LIBRARY)
++ TARGET_LINK_LIBRARIES(${LIB_NAME} ${OSG_DEPENDS_LIBRARY} ${CURL_LIBRARY} ${GDAL_LIBRARIES} ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} ${TIFF_LIBRARY} ${PROJ4_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY})
+ endif(NOT NRL_STATIC_LIBRARIES)
+
+ LINK_CORELIB_DEFAULT(${LIB_NAME} ${CMAKE_THREAD_LIBS_INIT} ${MATH_LIBRARY})
diff --git a/ports/osgearth/fix-tinyxml.patch b/ports/osgearth/fix-tinyxml.patch
deleted file mode 100644
index 9f9a6d96f..000000000
--- a/ports/osgearth/fix-tinyxml.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c78bd16..bf31091 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -193,7 +193,9 @@ OPTION(OSGEARTH_INSTALL_SHADERS "Whether to deploy GLSL shaders when doing a Mak
- # TinyXML is an XML parsing library
- SET (WITH_EXTERNAL_TINYXML FALSE CACHE BOOL "Use bundled or system wide version of TinyXML")
- IF (WITH_EXTERNAL_TINYXML)
-- find_package(TinyXML REQUIRED)
-+ find_package(tinyxml CONFIG REQUIRED)
-+ set(TINYXML_FOUND 1)
-+ set(TINYXML_LIBRARY unofficial-tinyxml::unofficial-tinyxml)
- ENDIF (WITH_EXTERNAL_TINYXML)
-
- # postfix settings for various configs
diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake
index 816aa50e3..4a7270469 100644
--- a/ports/osgearth/portfile.cmake
+++ b/ports/osgearth/portfile.cmake
@@ -1,11 +1,12 @@
-vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
-
-file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*)
-list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH)
-if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1)
- message(FATAL_ERROR "Could not determine osg version")
+# Only dynamic build need dlls
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*)
+ list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH)
+ if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1)
+ message(FATAL_ERROR "Could not determine osg version")
+ endif()
+ string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}")
endif()
-string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -13,18 +14,34 @@ vcpkg_from_github(
REF 342fcadf4c8892ba84841cb5b4162bdc51519e3c #version 3.1
SHA512 03378a918306846d2144e545785c783b01e33fa2dd5c77d16d390a275217b6ce7a3a743c35ae99a497b272a7516b055442c0a891bd312cce727a5538b40364f5
HEAD_REF master
- PATCHES
+ PATCHES
+ StaticOSG.patch # Fix port compilation in static-md module
+ deprecated_cpp_fix.patch # Fix port headers to not use classes deprecated in c++17. Gives errors when using the installed port headers
make-all-find-packages-required.patch
- fix-tinyxml.patch
+ fix-dependencies.patch
+ fix-dependency-osg.patch
+ remove-tool-debug-suffix.patch
)
# Upstream bug, see https://github.com/gwaldron/osgearth/issues/1002
file(REMOVE ${SOURCE_PATH}/src/osgEarth/tinyxml.h)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ tools OSGEARTH_BUILD_TOOLS
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS
+ OPTIONS ${FEATURE_OPTIONS}
+ -DOSGEARTH_BUILD_SHARED_LIBS=${BUILD_SHARED}
+ -DNRL_STATIC_LIBRARIES=${BUILD_STATIC}
+ -DOSG_IS_STATIC=${BUILD_STATIC}
+ -DGEOS_IS_STATIC=${BUILD_STATIC}
+ -DCURL_IS_STATIC=${BUILD_STATIC}
-DOSGEARTH_BUILD_EXAMPLES=OFF
-DOSGEARTH_BUILD_TESTS=OFF
-DOSGEARTH_BUILD_DOCS=OFF
@@ -36,39 +53,38 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-#Release
-set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT})
-set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR})
+if (WIN32 AND (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic))
+ #Release
+ set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT})
+ set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR})
-file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH})
-file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH})
+ file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH})
+ file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll)
-file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
-file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll)
+ file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH})
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR})
-file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH})
-file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH})
+ #Debug
+ set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT})
+ set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR})
-file(REMOVE_RECURSE ${OSGEARTH_TOOLS})
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/${OSG_PLUGINS_SUBDIR})
+ file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH})
-#Debug
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+ file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll)
-set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT})
-set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR})
+ file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH})
-file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PATH})
-file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH})
-
-file(GLOB OSGEARTH_DEBUG_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
-file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR}/osgdb*.dll)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR})
+endif()
-file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH})
-file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH})
+if ("tools" IN_LIST FEATURES)
+ vcpkg_copy_tools(TOOL_NAMES osgearth_3pv osgearth_atlas osgearth_boundarygen osgearth_clamp
+ osgearth_conv osgearth_overlayviewer osgearth_tfs osgearth_toc osgearth_version osgearth_viewer
+ AUTO_CLEAN
+ )
+endif()
-file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS})
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/${OSG_PLUGINS_SUBDIR})
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/osgearth/remove-tool-debug-suffix.patch b/ports/osgearth/remove-tool-debug-suffix.patch
new file mode 100644
index 000000000..24cbb2fe5
--- /dev/null
+++ b/ports/osgearth/remove-tool-debug-suffix.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeModules/OsgEarthMacroUtils.cmake b/CMakeModules/OsgEarthMacroUtils.cmake
+index 6e0eb46..12388c4 100644
+--- a/CMakeModules/OsgEarthMacroUtils.cmake
++++ b/CMakeModules/OsgEarthMacroUtils.cmake
+@@ -364,8 +364,6 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP)
+
+ SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}")
+ SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES OUTPUT_NAME ${TARGET_NAME})
+- SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_OUTPUT_NAME "${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}")
+- SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES RELEASE_OUTPUT_NAME "${TARGET_NAME}${CMAKE_RELEASE_POSTFIX}")
+ SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES RELWITHDEBINFO_OUTPUT_NAME "${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}")
+ SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES MINSIZEREL_OUTPUT_NAME "${TARGET_NAME}${CMAKE_MINSIZEREL_POSTFIX}")
+
diff --git a/ports/osgearth/vcpkg.json b/ports/osgearth/vcpkg.json
index aef74120b..1a84d6aa8 100644
--- a/ports/osgearth/vcpkg.json
+++ b/ports/osgearth/vcpkg.json
@@ -1,10 +1,10 @@
{
"name": "osgearth",
"version": "3.1",
- "port-version": 2,
+ "port-version": 3,
"description": "osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.",
"homepage": "https://github.com/gwaldron/osgearth",
- "supports": "!(x86 | wasm32) & !staticcrt",
+ "supports": "!(x86 | wasm32)",
"dependencies": [
"basisu",
"draco",
@@ -22,5 +22,13 @@
"protobuf",
"sqlite3",
"tinyxml"
- ]
+ ],
+ "default-features": [
+ "tools"
+ ],
+ "features": {
+ "tools": {
+ "description": "Build tools"
+ }
+ }
}
diff --git a/versions/baseline.json b/versions/baseline.json
index 4411252b3..fee501f25 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4494,7 +4494,7 @@
},
"osg": {
"baseline": "3.6.5",
- "port-version": 6
+ "port-version": 7
},
"osg-qt": {
"baseline": "Qt4",
@@ -4502,7 +4502,7 @@
},
"osgearth": {
"baseline": "3.1",
- "port-version": 2
+ "port-version": 3
},
"osi": {
"baseline": "0.108.6",
diff --git a/versions/o-/osg.json b/versions/o-/osg.json
index 973c0de20..3a40b3ef9 100644
--- a/versions/o-/osg.json
+++ b/versions/o-/osg.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "41c640888000654e84d2bf227b42973cc1ba15c9",
+ "version-string": "3.6.5",
+ "port-version": 7
+ },
+ {
"git-tree": "9b787269fae66af2447354c4e76ce0883c8d93b9",
"version-string": "3.6.5",
"port-version": 6
diff --git a/versions/o-/osgearth.json b/versions/o-/osgearth.json
index 674e0b0ab..c074ed279 100644
--- a/versions/o-/osgearth.json
+++ b/versions/o-/osgearth.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "d2483eb1bb083bdcf0b4de24f0f8c0d77825dc56",
+ "version": "3.1",
+ "port-version": 3
+ },
+ {
"git-tree": "9355b8ad52fcf4998fe4c262f29a4e01fa83b9fa",
"version": "3.1",
"port-version": 2