Skip to content

[osgearth] Add draco feature#13423

Closed
NancyLi1013 wants to merge 11 commits intomicrosoft:masterfrom
NancyLi1013:dev/NancyLi/add-feature-for-osgearth
Closed

[osgearth] Add draco feature#13423
NancyLi1013 wants to merge 11 commits intomicrosoft:masterfrom
NancyLi1013:dev/NancyLi/add-feature-for-osgearth

Conversation

@NancyLi1013
Copy link
Copy Markdown
Contributor

@NancyLi1013 NancyLi1013 commented Sep 9, 2020

Describe the pull request

Add draco for osgearth. Since gdal is required dependency of osgearth 3.1, which has been included in osg[plugins].

So, it's unnecessary to add gdal as a feature.

Note: Feature has passed with x64-windows.

osgearth only supports dynamic build.

@NancyLi1013 NancyLi1013 added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:internal labels Sep 9, 2020
@NancyLi1013 NancyLi1013 marked this pull request as ready for review September 30, 2020 06:14
…NancyLi/add-feature-for-osgearth

# Conflicts:
#	ports/osgearth/CONTROL
NancyLi1013 and others added 3 commits October 21, 2020 16:05
…NancyLi/add-feature-for-osgearth

# Conflicts:
#	ports/osgearth/CONTROL
#	ports/osgearth/portfile.cmake
….com/NancyLi1013/vcpkg into dev/NancyLi/add-feature-for-osgearth

# Conflicts:
#	ports/osgearth/portfile.cmake
NancyLi1013 and others added 3 commits December 23, 2020 14:02
Remove feature test
….com/NancyLi1013/vcpkg into dev/NancyLi/add-feature-for-osgearth

# Conflicts:
#	ports/osgearth/CONTROL
@NancyLi1013 NancyLi1013 changed the title [osgearth] Add draco and gdal features [osgearth] Add draco feature Dec 24, 2020
@JackBoosY JackBoosY added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Dec 28, 2020
Comment on lines +7 to +12
find_package(GEOS)
find_package(Sqlite3)
-find_package(Draco)
find_package(BASISU)
find_package(GLEW)
find_package(Protobuf)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like these should also be listed as dependencies of the port?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ports are optional dependencies of the port. So I didn't add them to the dependency lists.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

@BillyONeal BillyONeal Dec 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're optional, but it makes this port behave totally differently depending on what other ports are selected. That is, it makes

vcpkg install osgearth
vcpkg install sqlite

and

vcpkg install sqlite
vcpkg install osgearth

produce completely different results. Generally we need to either provide all such optional components or patch them to always be off.

I think your fix here addresses the Draco dependency, but the other dependencies here are just as likely to create the same problems.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be better to add options for every optional dependency. We can add these ports to the dependency lists or make patches to fix them now. We can consider to ask for help from upstream to make optional dependencies more flexible for users.

@BillyONeal BillyONeal added requires:author-response and removed info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. labels Dec 28, 2020
+ include(SelectLibraryConfigurations)
+
+ find_path(DRACO_INCLUDE_DIR draco/core/draco_version.h)
+ find_library(DRACO_LIBRARY_DEBUG NAMES draco dracodec dracoenc libdraco libdracodec libdracoenc NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't the draco port exposing the right bits here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't make sense. Could you please help describe more details?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, there should probably be a share/draco/dracoConfig.cmake or similar which does this find_library stuff for all consumers instead of only osgearth.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understand now. Thanks for your clarification.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried just making it REQUIRED and that seems to have passed over in #15777 ?

@NancyLi1013 NancyLi1013 marked this pull request as draft December 29, 2020 07:19
BillyONeal added a commit to BillyONeal/vcpkg that referenced this pull request Jan 20, 2021
…t less "flaky", and turn on in CI.

Add static-crt to platform-expression.

Related: microsoft#13423
@NancyLi1013
Copy link
Copy Markdown
Contributor Author

Closing this PR Temporarily.

@NancyLi1013 NancyLi1013 closed this Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build osgearth with optional dependence dacro

3 participants