mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 16:53:02 +08:00
[urho3d] Add features, fix usage (#18975)
* [urho3d] Add features, fix usage * update version stuff * fix typo * Correct installation * fix installation * update version * Re-fix install * Fix tools install * typo * Update versions/u-/urho3d.json
This commit is contained in:
parent
9ee3196412
commit
4eebfa3bef
17
ports/urho3d/add_options.patch
Normal file
17
ports/urho3d/add_options.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
|
||||
index 866fc22..ee02d2e 100644
|
||||
--- a/Source/CMakeLists.txt
|
||||
+++ b/Source/CMakeLists.txt
|
||||
@@ -147,8 +147,12 @@ endif ()
|
||||
|
||||
# In order to get clean module segregation, always exclude player/samples from AAR
|
||||
if (NOT ANDROID)
|
||||
+ if (URHO3D_BUILD_TOOLS)
|
||||
add_subdirectory (Tools)
|
||||
+ endif()
|
||||
+ if (URHO3D_BUILD_SAMPLES)
|
||||
add_subdirectory (Samples)
|
||||
+ endif()
|
||||
endif ()
|
||||
|
||||
if (URHO3D_EXTRAS)
|
187
ports/urho3d/fix-install.patch
Normal file
187
ports/urho3d/fix-install.patch
Normal file
@ -0,0 +1,187 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b8f54e9..1c23bbc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -37,7 +37,6 @@ set (PATH_SUFFIX Urho3D)
|
||||
if (WIN32)
|
||||
set (SCRIPT_EXT .bat)
|
||||
if (CMAKE_HOST_WIN32)
|
||||
- set (PATH_SUFFIX .)
|
||||
if (URHO3D_64BIT AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
string (REPLACE " (x86)" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
endif ()
|
||||
@@ -45,7 +44,7 @@ if (WIN32)
|
||||
else ()
|
||||
set (SCRIPT_EXT .sh)
|
||||
endif ()
|
||||
-if (URHO3D_64BIT)
|
||||
+if (0)
|
||||
# Install to 'lib64' when one of these conditions is true
|
||||
if ((MINGW AND CMAKE_CROSSCOMPILING) OR URHO3D_USE_LIB64_RPM OR (HAS_LIB64 AND NOT URHO3D_USE_LIB_DEB))
|
||||
set (LIB_SUFFIX 64)
|
||||
@@ -59,7 +58,7 @@ set (DEST_LIBRARY_DIR lib${LIB_SUFFIX}/${PATH_SUFFIX})
|
||||
set (DEST_PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig)
|
||||
# Install application launcher scripts
|
||||
file (GLOB APP_SCRIPTS ${CMAKE_SOURCE_DIR}/bin/*${SCRIPT_EXT})
|
||||
-install (PROGRAMS ${APP_SCRIPTS} DESTINATION ${DEST_RUNTIME_DIR}) # DEST_RUNTIME_DIR variable is set by the set_output_directories() macro call in the UrhoCommon module
|
||||
+install (PROGRAMS ${APP_SCRIPTS} DESTINATION ${DEST_SHARE_DIR}/script) # DEST_RUNTIME_DIR variable is set by the set_output_directories() macro call in the UrhoCommon module
|
||||
# Install CMake modules and toolchains provided by and for Urho3D
|
||||
install (DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/ DESTINATION ${DEST_SHARE_DIR}/cmake) # Note: the trailing slash is significant
|
||||
# Install CMake build scripts and rakefile
|
||||
diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt
|
||||
index 9993d07..9a58363 100644
|
||||
--- a/Docs/CMakeLists.txt
|
||||
+++ b/Docs/CMakeLists.txt
|
||||
@@ -99,7 +99,7 @@ if (DOXYGEN_FOUND)
|
||||
execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt.new)
|
||||
file (GLOB_RECURSE API_PKG_FILES ${CMAKE_SOURCE_DIR}/Source/Urho3D/LuaScript/pkgs/*.pkg)
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaScriptAPI.dox
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -L ToDoxHook.lua -P -o ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaScriptAPI.dox ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt
|
||||
+ COMMAND ${CMAKE_BINARY_DIR}/tools/urho3d/tolua++ -L ToDoxHook.lua -P -o ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaScriptAPI.dox ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt
|
||||
DEPENDS tolua++ ${API_PKG_FILES} ${CMAKE_CURRENT_BINARY_DIR}/generated/LuaPkgToDox.txt ${CMAKE_SOURCE_DIR}/Source/Urho3D/LuaScript/pkgs/ToDoxHook.lua
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/Source/Urho3D/LuaScript/pkgs
|
||||
COMMENT "Dumping LuaScript API to LuaScriptAPI.dox")
|
||||
diff --git a/Source/ThirdParty/LuaJIT/CMakeLists.txt b/Source/ThirdParty/LuaJIT/CMakeLists.txt
|
||||
index f1ec925..c310fcc 100644
|
||||
--- a/Source/ThirdParty/LuaJIT/CMakeLists.txt
|
||||
+++ b/Source/ThirdParty/LuaJIT/CMakeLists.txt
|
||||
@@ -603,7 +603,7 @@ if (NOT CMAKE_PROJECT_NAME MATCHES ^Urho3D-ExternalProject-LuaJIT AND NOT IOS AN
|
||||
|
||||
# Install dependency files required by luajit
|
||||
if (DEST_RUNTIME_DIR)
|
||||
- install (DIRECTORY ${LUAJIT_DEP_DIR} DESTINATION ${DEST_RUNTIME_DIR})
|
||||
+ install (DIRECTORY ${LUAJIT_DEP_DIR} DESTINATION share/Urho3D)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
diff --git a/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt b/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt
|
||||
index 0cd69fc..e761ef6 100644
|
||||
--- a/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt
|
||||
+++ b/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt
|
||||
@@ -52,7 +52,7 @@ if (URHO3D_UPDATE_SOURCE_TREE)
|
||||
endif ()
|
||||
file (GLOB TOLUA lua/*.lua)
|
||||
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -o ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c -H ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.h -n tolua tolua_scons.pkg 2>${NULL_DEVICE} || ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/toluabind.c ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c
|
||||
+ COMMAND ${CMAKE_BINARY_DIR}/tools/urho3d/tolua++ -o ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c -H ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.h -n tolua tolua_scons.pkg 2>${NULL_DEVICE} || ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/toluabind.c ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c
|
||||
${UPDATE_COMMAND}
|
||||
DEPENDS ${TOLUA} tolua_scons.pkg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
diff --git a/Source/Tools/CMakeLists.txt b/Source/Tools/CMakeLists.txt
|
||||
index 65b59d9..db8f5cd 100644
|
||||
--- a/Source/Tools/CMakeLists.txt
|
||||
+++ b/Source/Tools/CMakeLists.txt
|
||||
@@ -51,24 +51,24 @@ if (CMAKE_CROSSCOMPILING)
|
||||
if (URHO3D_PACKAGING)
|
||||
ExternalProject_Add (PackageTool
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/Tools/PackageTool
|
||||
- CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
+ CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
${ALTERNATE_COMMAND})
|
||||
add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/PackageTool)
|
||||
if (CMAKE_HOST_WIN32 AND NOT HAS_MKLINK)
|
||||
add_dependencies (PackageTool Urho3D) # Ensure Urho3D headers are fresh when building PackageTool externally on Windows host system without MKLINK
|
||||
endif ()
|
||||
- install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/PackageTool DESTINATION ${DEST_RUNTIME_DIR}/tool)
|
||||
+ install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/PackageTool DESTINATION ${DEST_RUNTIME_DIR})
|
||||
endif ()
|
||||
if (URHO3D_GENERATEBINDINGS)
|
||||
ExternalProject_Add (BindingGenerator
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/Tools/BindingGenerator
|
||||
- CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
+ CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D BAKED_CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
${ALTERNATE_COMMAND})
|
||||
add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/BindingGenerator)
|
||||
if (CMAKE_HOST_WIN32 AND NOT HAS_MKLINK)
|
||||
add_dependencies (BindingGenerator Urho3D)
|
||||
endif ()
|
||||
- install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/BindingGenerator DESTINATION ${DEST_RUNTIME_DIR}/tool)
|
||||
+ install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/tool/BindingGenerator DESTINATION ${DEST_RUNTIME_DIR})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
diff --git a/Source/Urho3D/CMakeLists.txt b/Source/Urho3D/CMakeLists.txt
|
||||
index 7433020..8161011 100644
|
||||
--- a/Source/Urho3D/CMakeLists.txt
|
||||
+++ b/Source/Urho3D/CMakeLists.txt
|
||||
@@ -283,7 +283,7 @@ if (URHO3D_BINDINGS)
|
||||
endif ()
|
||||
ExternalProject_Add (AutoBinder
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/Clang-Tools
|
||||
- CMAKE_ARGS -D URHO3D_CLANG_TOOLS=AutoBinder -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool/clang -D DEST_INCLUDE_DIR=${DEST_INCLUDE_DIR} -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
+ CMAKE_ARGS -D URHO3D_CLANG_TOOLS=AutoBinder -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d/clang -D DEST_INCLUDE_DIR=${DEST_INCLUDE_DIR} -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
${ALTERNATE_COMMAND})
|
||||
add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/clang/AutoBinder)
|
||||
file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated/generated)
|
||||
@@ -319,10 +319,10 @@ if (URHO3D_LUA)
|
||||
set(CMAKE_DISABLE_SOURCE_CHANGES OFF)
|
||||
ExternalProject_Add (tolua++
|
||||
SOURCE_DIR ${CMAKE_SOURCE_DIR}/Source/ThirdParty/toluapp/src/bin
|
||||
- CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/bin/tool -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D URHO3D_UPDATE_SOURCE_TREE=${URHO3D_UPDATE_SOURCE_TREE} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
+ CMAKE_ARGS -D URHO3D_DEPLOYMENT_TARGET=generic -D DEST_RUNTIME_DIR=${CMAKE_BINARY_DIR}/tools/urho3d -D BAKED_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR} -D URHO3D_UPDATE_SOURCE_TREE=${URHO3D_UPDATE_SOURCE_TREE} -D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
|
||||
${TRAVIS_ANDROID_FIX}
|
||||
${ALTERNATE_COMMAND})
|
||||
- add_make_clean_files (${CMAKE_BINARY_DIR}/bin/tool/tolua++)
|
||||
+ add_make_clean_files (${CMAKE_BINARY_DIR}/tools/urho3d/tolua++)
|
||||
else ()
|
||||
# Otherwise, build it internally as per normal
|
||||
add_subdirectory (../ThirdParty/toluapp/src/bin ../ThirdParty/toluapp/src/bin)
|
||||
@@ -343,7 +343,7 @@ if (URHO3D_LUA)
|
||||
list (APPEND LUA_GEN_CPP_FILES ${GEN_CPP_FILE})
|
||||
file (GLOB PKG_FILES LuaScript/pkgs/${DIR}/*.pkg)
|
||||
add_custom_command (OUTPUT ${GEN_CPP_FILE}
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -E ${CMAKE_PROJECT_NAME} -L ToCppHook.lua -o ${GEN_CPP_FILE} ${NAME}
|
||||
+ COMMAND ${CMAKE_BINARY_DIR}/tools/urho3d/tolua++ -E ${CMAKE_PROJECT_NAME} -L ToCppHook.lua -o ${GEN_CPP_FILE} ${NAME}
|
||||
DEPENDS tolua++ ${API_PKG_FILE} ${PKG_FILES} LuaScript/pkgs/ToCppHook.lua
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/LuaScript/pkgs
|
||||
COMMENT "Generating tolua++ API binding on the fly for ${DIR}")
|
||||
diff --git a/cmake/Modules/UrhoCommon.cmake b/cmake/Modules/UrhoCommon.cmake
|
||||
index cfac648..b196095 100644
|
||||
--- a/cmake/Modules/UrhoCommon.cmake
|
||||
+++ b/cmake/Modules/UrhoCommon.cmake
|
||||
@@ -1358,7 +1358,7 @@ macro (find_Urho3D_tool VAR NAME)
|
||||
find_program (${VAR} ${NAME} HINTS ${ARG_HINTS} PATHS ${ARG_PATHS} PATH_SUFFIXES ${ARG_PATH_SUFFIXES} DOC ${ARG_DOC} NO_DEFAULT_PATH)
|
||||
mark_as_advanced (${VAR}) # Hide it from cmake-gui in non-advanced mode
|
||||
if (NOT ${VAR})
|
||||
- set (${VAR} ${CMAKE_BINARY_DIR}/bin/tool/${NAME})
|
||||
+ set (${VAR} ${CMAKE_BINARY_DIR}/tools/urho3d/${NAME})
|
||||
if (ARG_MSG_MODE AND NOT CMAKE_PROJECT_NAME STREQUAL Urho3D)
|
||||
message (${ARG_MSG_MODE}
|
||||
"Could not find ${VAR} tool in the Urho3D build tree or Urho3D SDK. Your project may not build successfully without this tool. "
|
||||
@@ -1515,8 +1515,8 @@ macro (setup_executable)
|
||||
if (ARG_TOOL)
|
||||
list (APPEND TARGET_PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH YES)
|
||||
if (NOT ARG_PRIVATE AND NOT DEST_RUNTIME_DIR MATCHES tool)
|
||||
- set_output_directories (${CMAKE_BINARY_DIR}/bin/tool LOCAL RUNTIME PDB)
|
||||
- set (RUNTIME_DIR ${CMAKE_BINARY_DIR}/bin/tool)
|
||||
+ set_output_directories (${CMAKE_BINARY_DIR}/tools/urho3d LOCAL RUNTIME PDB)
|
||||
+ set (RUNTIME_DIR ${CMAKE_BINARY_DIR}/tools/urho3d)
|
||||
endif ()
|
||||
endif ()
|
||||
if (NOT ARG_NODEPS)
|
||||
@@ -1570,7 +1570,6 @@ macro (setup_executable)
|
||||
endif ()
|
||||
if (DIRECT3D_DLL AND NOT DIRECT3D_DLL_INSTALLED)
|
||||
# Make a copy of the D3D DLL to the runtime directory in the installed location
|
||||
- install (FILES ${DIRECT3D_DLL} DESTINATION ${DEST_RUNTIME_DIR})
|
||||
set (DIRECT3D_DLL_INSTALLED TRUE)
|
||||
endif ()
|
||||
endif ()
|
||||
@@ -1692,7 +1691,7 @@ macro (setup_main_executable)
|
||||
if (URHO3D_PACKAGING)
|
||||
# Urho3D project builds the PackageTool as required; downstream project uses PackageTool found in the Urho3D build tree or Urho3D SDK
|
||||
find_Urho3d_tool (PACKAGE_TOOL PackageTool
|
||||
- HINTS ${CMAKE_BINARY_DIR}/bin/tool ${URHO3D_HOME}/bin/tool
|
||||
+ HINTS ${CMAKE_BINARY_DIR}/tools/urho3d ${URHO3D_HOME}/bin/tool
|
||||
DOC "Path to PackageTool" MSG_MODE WARNING)
|
||||
if (CMAKE_PROJECT_NAME STREQUAL Urho3D)
|
||||
set (PACKAGING_DEP DEPENDS PackageTool)
|
||||
@@ -1741,7 +1740,7 @@ macro (setup_main_executable)
|
||||
foreach (DIR ${RESOURCE_DIRS})
|
||||
list (FIND INSTALLED_RESOURCE_DIRS ${DIR} FOUND_INDEX)
|
||||
if (FOUND_INDEX EQUAL -1)
|
||||
- install (DIRECTORY ${DIR} DESTINATION ${DEST_SHARE_DIR}/resources)
|
||||
+ install (DIRECTORY ${DIR} DESTINATION tools/urho3d)
|
||||
list (APPEND INSTALLED_RESOURCE_DIRS ${DIR})
|
||||
endif ()
|
||||
# This cache variable is used to keep track of whether a resource directory has been instructed to be installed by CMake or not
|
@ -9,6 +9,8 @@ vcpkg_from_github(
|
||||
macosx.patch
|
||||
shared_libs.patch
|
||||
externalproject.patch
|
||||
add_options.patch
|
||||
fix-install.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
@ -17,46 +19,100 @@ else()
|
||||
set(URHO3D_LIB_TYPE "SHARED")
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools URHO3D_BUILD_TOOLS
|
||||
examples URHO3D_BUILD_SAMPLES
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DURHO3D_LIB_TYPE=${URHO3D_LIB_TYPE}
|
||||
-DURHO3D_C++11=ON
|
||||
-DURHO3D_PCH=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/Urho3D/CMake/Modules)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/Urho3D/CMake/Modules)
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/CMake/Modules)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/CMake/Modules)
|
||||
endif()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/Urho3D/Resources)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Urho3D/Resources/Autoload ${CURRENT_PACKAGES_DIR}/tools/${PORT}/Autoload)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Urho3D/Resources/CoreData ${CURRENT_PACKAGES_DIR}/tools/${PORT}/CoreData)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Urho3D/Resources/Data ${CURRENT_PACKAGES_DIR}/tools/${PORT}/Data)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Urho3D/Resources)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/Urho3D/CMake/Modules")
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/Urho3D/CMake/Modules)
|
||||
endif()
|
||||
if(EXISTS ${CURRENT_PACKAGES_DIR}/share/Resources)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Resources/Autoload ${CURRENT_PACKAGES_DIR}/tools/${PORT}/Autoload)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Resources/CoreData ${CURRENT_PACKAGES_DIR}/tools/${PORT}/CoreData)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/Resources/Data ${CURRENT_PACKAGES_DIR}/tools/${PORT}/Data)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Resources)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/CMake/Modules")
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/CMake/Modules)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Urho3D/LuaScript/pkgs)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Urho3D/ThirdParty/LuaJIT/jit)
|
||||
# Handle tools
|
||||
if ("tools" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_ANDROID)
|
||||
vcpkg_copy_tools(TOOL_NAMES AssetImporter OgreImporter PackageTool RampGenerator ScriptCompiler SpritePacker
|
||||
SEARCH_DIR "${CURRENT_PACKAGES_DIR}/tools/urho3d"
|
||||
AUTO_CLEAN
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/tool" "${CURRENT_PACKAGES_DIR}/debug/bin/tool")
|
||||
|
||||
vcpkg_copy_tools(TOOL_NAMES Urho3DPlayer AUTO_CLEAN)
|
||||
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/Urho3DPlayer_d${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
# Handle examples
|
||||
if ("examples" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_ANDROID)
|
||||
file(GLOB URHO3D_BINARIES "${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
foreach(URHO3D_BINARY ${URHO3D_BINARIES})
|
||||
get_filename_component(BINARY_NAME ${URHO3D_BINARY} NAME_WE)
|
||||
if (BINARY_NAME MATCHES "[0-9][0-9]\_.+")
|
||||
list(APPEND URHO3D_TOOLS ${BINARY_NAME})
|
||||
endif()
|
||||
endforeach()
|
||||
vcpkg_copy_tools(TOOL_NAMES ${URHO3D_TOOLS} AUTO_CLEAN)
|
||||
|
||||
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
foreach(URHO3D_TOOL IN_LIST ${URHO3D_TOOLS})
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${URHO3D_TOOL}_d${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/luajit${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
list(APPEND LUA_EXES "luajit")
|
||||
endif()
|
||||
if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/lua${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
list(APPEND LUA_EXES "lua")
|
||||
endif()
|
||||
if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/luac${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
list(APPEND LUA_EXES "luac")
|
||||
endif()
|
||||
vcpkg_copy_tools(TOOL_NAMES ${LUA_EXES} AUTO_CLEAN)
|
||||
|
||||
# Cleanup
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
# Fix includes
|
||||
list(APPEND SDL_RELATED_HEADERS
|
||||
"${CURRENT_PACKAGES_DIR}/include/Urho3D/Input/InputConstants.h"
|
||||
"${CURRENT_PACKAGES_DIR}/include/Urho3D/IO/NamedPipe.h"
|
||||
"${CURRENT_PACKAGES_DIR}/include/Urho3D/IO/RWOpsWrapper.h"
|
||||
)
|
||||
foreach (SDL_RELATED_HEADER ${SDL_RELATED_HEADERS})
|
||||
vcpkg_replace_string("${SDL_RELATED_HEADER}"
|
||||
"#include <SDL/"
|
||||
"#include <Urho3D/ThirdParty/SDL/"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/Urho3D/LuaScript/pkgs")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/Urho3D/ThirdParty/LuaJIT/jit")
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,6 +1,8 @@
|
||||
{
|
||||
"$note": "Due to the upstream modification of the dependent source code, the internal port of vcpkg cannot be used.",
|
||||
"name": "urho3d",
|
||||
"version-date": "2021-03-01",
|
||||
"port-version": 1,
|
||||
"description": "Urho3D is a free lightweight, cross-platform 2D and 3D game engine implemented in C++ and released under the MIT license. Greatly inspired by OGRE and Horde3D.",
|
||||
"homepage": "https://github.com/urho3d/Urho3D",
|
||||
"supports": "!(arm | uwp)",
|
||||
@ -13,5 +15,13 @@
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"features": {
|
||||
"examples": {
|
||||
"description": "Build examples."
|
||||
},
|
||||
"tools": {
|
||||
"description": "Build tools."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6462,7 +6462,7 @@
|
||||
},
|
||||
"urho3d": {
|
||||
"baseline": "2021-03-01",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"uriparser": {
|
||||
"baseline": "0.9.4",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a31df110bd09d7f49eec0cc5e7f19799ab83564a",
|
||||
"version-date": "2021-03-01",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "1f456f57b63fe4e73605d2b2b5827aa4db385438",
|
||||
"version-date": "2021-03-01",
|
||||
|
Loading…
Reference in New Issue
Block a user