2017-07-22 16:28:48 +08:00
|
|
|
include(vcpkg_common_functions)
|
2018-06-20 17:02:39 +08:00
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
|
2018-06-20 17:02:39 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO openscenegraph/OpenSceneGraph
|
2019-05-11 03:50:38 +08:00
|
|
|
REF OpenSceneGraph-3.6.3
|
|
|
|
SHA512 5d66002cffa935ce670a119ffaebd8e4709acdf79ae2b34b37ad9df284ec8a1a74fee5a7a4109fbf3da6b8bd857960f2b7ae68c4c2e26036edbf484fccf08322
|
2018-06-20 17:02:39 +08:00
|
|
|
HEAD_REF master
|
2019-02-12 06:23:46 +08:00
|
|
|
PATCHES
|
2019-05-03 13:57:43 +08:00
|
|
|
collada.patch
|
2017-07-22 16:28:48 +08:00
|
|
|
)
|
|
|
|
|
2019-04-03 03:55:16 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
set(OSG_DYNAMIC OFF)
|
|
|
|
else()
|
|
|
|
set(OSG_DYNAMIC ON)
|
|
|
|
endif()
|
2019-05-27 00:54:09 +08:00
|
|
|
file(REMOVE ${SOURCE_PATH}/CMakeModules/FindSDL2.cmake)
|
2017-07-22 16:28:48 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
|
|
|
-DOSG_USE_UTF8_FILENAME=ON
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2019-05-03 13:57:43 +08:00
|
|
|
# handle osg tools and plugins
|
2017-07-22 16:28:48 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osg)
|
|
|
|
file(MAKE_DIRECTORY ${OSG_TOOL_PATH})
|
|
|
|
|
|
|
|
file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
|
|
|
file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH})
|
|
|
|
file(REMOVE_RECURSE ${OSG_TOOLS})
|
|
|
|
file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
|
|
|
file(REMOVE_RECURSE ${OSG_TOOLS_DBG})
|
|
|
|
|
2019-05-11 03:50:38 +08:00
|
|
|
file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.6.3/*.dll)
|
|
|
|
file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/osg/osgPlugins-3.6.3)
|
|
|
|
file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.6.3/*.dll)
|
|
|
|
file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.6.3)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.6.3/)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.6.3/)
|
2017-07-22 16:28:48 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osg)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/osg/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osg/copyright)
|
2019-04-03 03:55:16 +08:00
|
|
|
|
|
|
|
#Cleanup
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|