diff options
| author | ankurverma85 <31362771+ankurverma85@users.noreply.github.com> | 2021-03-25 13:28:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-25 13:28:42 -0700 |
| commit | 5a10163c44526b5d42a67480ce7a692a36948761 (patch) | |
| tree | c62543931827cad6fddf592e41b05a162cdd075e /ports/osgearth/StaticOSG.patch | |
| parent | c2e1d32c25c77a258e103e00d778f6d935b44e73 (diff) | |
| download | vcpkg-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>
Diffstat (limited to 'ports/osgearth/StaticOSG.patch')
| -rw-r--r-- | ports/osgearth/StaticOSG.patch | 84 |
1 files changed, 84 insertions, 0 deletions
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 + |
