diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2021-07-02 00:14:08 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-01 09:14:08 -0700 |
| commit | 2d15043211a07cf6b32678e168ee919015f7e5c8 (patch) | |
| tree | 6a5410b40c5e3a29678bd448b46ca8959a00857f /ports | |
| parent | 59e3243c9911d1f736ac39c17a77a92fa2b9cddc (diff) | |
| download | vcpkg-2d15043211a07cf6b32678e168ee919015f7e5c8.tar.gz vcpkg-2d15043211a07cf6b32678e168ee919015f7e5c8.zip | |
[recast] Export unofficial target (#18671)
* [recast] Export unofficial target
* update version record
* Export INTERFACE_INCLUDE_DIRECTORIES
* Export more include dirs.
* Update versions/r-/recast.json
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/recast/CMakeLists.txt | 26 | ||||
| -rw-r--r-- | ports/recast/CONTROL | 4 | ||||
| -rw-r--r-- | ports/recast/portfile.cmake | 12 | ||||
| -rw-r--r-- | ports/recast/vcpkg.json | 17 |
4 files changed, 42 insertions, 17 deletions
diff --git a/ports/recast/CMakeLists.txt b/ports/recast/CMakeLists.txt index 5b54f6e20..7ccc0828a 100644 --- a/ports/recast/CMakeLists.txt +++ b/ports/recast/CMakeLists.txt @@ -1,14 +1,6 @@ cmake_minimum_required(VERSION 3.8)
project(recast)
-include_directories(
- DebugUtils/Include
- Detour/Include
- DetourCrowd/Include
- DetourTileCache/Include
- Recast/Include
-)
-
set(SRC
DebugUtils/Source/DebugDraw.cpp
DebugUtils/Source/DetourDebugDraw.cpp
@@ -42,12 +34,30 @@ set(SRC add_library(recast ${SRC})
+target_include_directories(
+ recast PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/DebugUtils/Include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Detour/Include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/DetourCrowd/Include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/DetourTileCache/Include>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Recast/Include>
+ $<INSTALL_INTERFACE:include>
+ $<INSTALL_INTERFACE:include/Detour/Include>
+ $<INSTALL_INTERFACE:include/DetourCrowd/Include>
+ $<INSTALL_INTERFACE:include/DetourTileCache/Include>
+ $<INSTALL_INTERFACE:include/Recast/Include>
+ $<INSTALL_INTERFACE:include/DebugUtils/Include>
+)
+
install(
TARGETS recast
+ EXPORT unofficial-recast-config
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
+install(EXPORT unofficial-recast-config DESTINATION share/unofficial-recast)
+
if(NOT DISABLE_INSTALL_HEADERS)
install(DIRECTORY DebugUtils/Include/ DESTINATION include/recast/DebugUtils)
install(DIRECTORY Detour/Include/ DESTINATION include/recast/Detour)
diff --git a/ports/recast/CONTROL b/ports/recast/CONTROL deleted file mode 100644 index 3726b99d5..000000000 --- a/ports/recast/CONTROL +++ /dev/null @@ -1,4 +0,0 @@ -Source: recast
-Version: 1.5.1-3
-Homepage: https://github.com/recastnavigation/recastnavigation
-Description: Navigation-mesh Toolset for Games
diff --git a/ports/recast/portfile.cmake b/ports/recast/portfile.cmake index 3b6038e41..11484caa1 100644 --- a/ports/recast/portfile.cmake +++ b/ports/recast/portfile.cmake @@ -8,16 +8,18 @@ vcpkg_from_github( HEAD_REF master ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") -vcpkg_configure_cmake( +vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA ) -vcpkg_install_cmake() +vcpkg_cmake_install() -file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/recast RENAME copyright) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-recast CONFIG_PATH share/unofficial-recast) vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/recast/vcpkg.json b/ports/recast/vcpkg.json new file mode 100644 index 000000000..5abe9f93b --- /dev/null +++ b/ports/recast/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "recast", + "version": "1.5.1", + "port-version": 4, + "description": "Navigation-mesh Toolset for Games", + "homepage": "https://github.com/recastnavigation/recastnavigation", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |
