vcpkg/ports/osgearth/fix-osgearth-config.patch
Connor Broyles 4941494d49
[osgearth] Fix find_path regression (#27672)
* [osgearth] Fix find_path regression

* Update version

* Run x-add-version
2022-11-07 15:37:32 -08:00

87 lines
2.9 KiB
Diff

diff --git a/osgEarthConfig.cmake.in b/osgEarthConfig.cmake.in
index 3f27dffe9..c787e7668 100644
--- a/osgEarthConfig.cmake.in
+++ b/osgEarthConfig.cmake.in
@@ -6,52 +6,54 @@ set(XPREFIX OSGEARTH)
-if (osgearth_USE_STATIC_LIBS)
+if (osgEarth_USE_STATIC_LIBS)
set(XPREFIX ${XPREFIX}_STATIC)
endif()
-set(osgearth_DEFINITIONS ${${XPREFIX}_CFLAGS})
+set(osgEarth_DEFINITIONS ${${XPREFIX}_CFLAGS})
-find_path(osgearth_INCLUDE_DIR
- NAMES OSGEARTH/RTREE.H
+find_path(osgEarth_INCLUDE_DIR
+ NAMES osgEarth/rtree.h
HINTS ${${XPREFIX}_INCLUDE_DIRS}
)
-set(OSGEARTH_NAMES osgearth)
+set(OSGEARTH_NAMES osgEarth)
-find_library(osgearth_LIBRARY
+find_library(osgEarth_LIBRARY
NAMES ${OSGEARTH_NAMES}
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
-set(osgearth_LIBRARIES ${osgearth_LIBRARY})
-set(osgearth_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
-set(osgearth_LIBRARY_DIR ${osgearth_LIBRARY_DIRS})
-set(osgearth_INCLUDE_DIRS ${osgearth_INCLUDE_DIR})
-set(osgearth_LDFLAGS ${${XPREFIX}_LDFLAGS})
+set(osgEarth_LIBRARIES ${osgEarth_LIBRARY})
+set(osgEarth_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
+set(osgEarth_LIBRARY_DIR ${osgEarth_LIBRARY_DIRS})
+set(osgEarth_INCLUDE_DIRS ${osgEarth_INCLUDE_DIR})
+set(osgEarth_LDFLAGS ${${XPREFIX}_LDFLAGS})
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(osgearth DEFAULT_MSG
- osgearth_LIBRARY
- osgearth_INCLUDE_DIR
+find_package_handle_standard_args(osgEarth DEFAULT_MSG
+ osgEarth_LIBRARY
+ osgEarth_INCLUDE_DIR
)
-string (REPLACE ";" " " osgearth_LDFLAGS "${osgearth_LDFLAGS}")
+string (REPLACE ";" " " osgEarth_LDFLAGS "${osgEarth_LDFLAGS}")
-set_target_properties(osgearth
+add_library(osgEarth UNKNOWN IMPORTED)
+
+set_target_properties(osgEarth
PROPERTIES
- IMPORTED_LOCATION "${osgearth_LIBRARIES}"
- INTERFACE_INCLUDE_DIRECTORIES "${osgearth_INCLUDE_DIRS}"
- INTERFACE_LINK_LIBRARIES "${osgearth_LDFLAGS}"
- INTERFACE_COMPILE_OPTIONS "${osgearth_DEFINITIONS}"
+ IMPORTED_LOCATION "${osgEarth_LIBRARIES}"
+ INTERFACE_INCLUDE_DIRECTORIES "${osgEarth_INCLUDE_DIRS}"
+ INTERFACE_LINK_LIBRARIES "${osgEarth_LDFLAGS}"
+ INTERFACE_COMPILE_OPTIONS "${osgEarth_DEFINITIONS}"
)
- message(STATUS "osgearth_FOUND: ${osgearth_FOUND}")
- message(STATUS "osgearth_INCLUDE_DIRS: ${osgearth_INCLUDE_DIRS}")
- message(STATUS "osgearth_LIBRARIES: ${osgearth_LIBRARIES}")
- message(STATUS "osgearth_LDFLAGS: ${osgearth_LDFLAGS}")
- message(STATUS "osgearth_DEFINITIONS: ${osgearth_DEFINITIONS}")
+ message(STATUS "osgEarth_FOUND: ${osgEarth_FOUND}")
+ message(STATUS "osgEarth_INCLUDE_DIRS: ${osgEarth_INCLUDE_DIRS}")
+ message(STATUS "osgEarth_LIBRARIES: ${osgEarth_LIBRARIES}")
+ message(STATUS "osgEarth_LDFLAGS: ${osgEarth_LDFLAGS}")
+ message(STATUS "osgEarth_DEFINITIONS: ${osgEarth_DEFINITIONS}")
-check_required_components(osgearth)
\ No newline at end of file
+check_required_components(osgEarth)