2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
2018-05-20 09:12:48 +08:00
|
|
|
|
2018-07-18 06:47:24 +08:00
|
|
|
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}")
|
|
|
|
|
2018-05-20 09:12:48 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO gwaldron/osgearth
|
2020-08-01 02:35:04 +08:00
|
|
|
REF 90ad04f281cbc87ffc45bed847ebaaecb188e593 #version 3.0
|
|
|
|
SHA512 d1d59ae65cb4ef8a71e01b42411029e61bef20e2fd6d95b81c091d7d32b8c30f96d3156d7fd28e177ca83fd74ed113b9e31bf5ef360757524beb7cec7ced4996
|
2018-05-20 09:12:48 +08:00
|
|
|
HEAD_REF master
|
2019-08-15 13:27:14 +08:00
|
|
|
PATCHES
|
2020-08-01 02:35:04 +08:00
|
|
|
RocksDB.patch
|
2018-05-20 09:12:48 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
#Release
|
2020-08-01 02:35:04 +08:00
|
|
|
set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
2018-07-18 06:47:24 +08:00
|
|
|
set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR})
|
2018-05-20 09:12:48 +08:00
|
|
|
|
|
|
|
file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH})
|
|
|
|
file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH})
|
|
|
|
|
|
|
|
file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
|
|
|
file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/osgdb*.dll)
|
|
|
|
|
|
|
|
file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH})
|
|
|
|
file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH})
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${OSGEARTH_TOOLS})
|
|
|
|
file(REMOVE_RECURSE ${OSGDB_PLUGINS})
|
|
|
|
|
|
|
|
#Debug
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
2020-08-01 02:35:04 +08:00
|
|
|
set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT})
|
2018-07-18 06:47:24 +08:00
|
|
|
set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR})
|
2018-05-20 09:12:48 +08:00
|
|
|
|
|
|
|
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/osgdb*.dll)
|
|
|
|
|
|
|
|
file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH})
|
|
|
|
file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH})
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS})
|
|
|
|
file(REMOVE_RECURSE ${OSGDB_DEBUG_PLUGINS})
|
|
|
|
|
|
|
|
|
|
|
|
# Handle copyright
|
2020-08-01 02:35:04 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|