diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/chipmunk/export-targets.patch | |
Diffstat (limited to 'vcpkg/ports/chipmunk/export-targets.patch')
| -rw-r--r-- | vcpkg/ports/chipmunk/export-targets.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/vcpkg/ports/chipmunk/export-targets.patch b/vcpkg/ports/chipmunk/export-targets.patch new file mode 100644 index 0000000..de88e49 --- /dev/null +++ b/vcpkg/ports/chipmunk/export-targets.patch @@ -0,0 +1,40 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 34882d1..d47c303 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,7 +31,9 @@ if(BUILD_SHARED) + # need to explicitly link to the math library because the CMake/Android toolchains may not do it automatically + target_link_libraries(chipmunk m) + endif(ANDROID OR UNIX) +- install(TARGETS chipmunk RUNTIME DESTINATION ${BIN_INSTALL_DIR} ++ target_include_directories(chipmunk INTERFACE $<INSTALL_INTERFACE:include>) ++ install(TARGETS chipmunk EXPORT unofficial-chipmunk-config ++ RUNTIME DESTINATION ${BIN_INSTALL_DIR} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + endif(BUILD_SHARED) +@@ -46,9 +48,12 @@ if(BUILD_STATIC) + set_target_properties(chipmunk_static PROPERTIES LINKER_LANGUAGE CXX) + endif(MSVC) + # Sets chipmunk_static to output "libchipmunk.a" not "libchipmunk_static.a" +- set_target_properties(chipmunk_static PROPERTIES OUTPUT_NAME chipmunk) ++ set_target_properties(chipmunk_static PROPERTIES OUTPUT_NAME chipmunk EXPORT_NAME chipmunk) ++ target_include_directories(chipmunk_static INTERFACE $<INSTALL_INTERFACE:include>) + if(INSTALL_STATIC) +- install(TARGETS chipmunk_static ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) ++ install(TARGETS chipmunk_static EXPORT unofficial-chipmunk-config ++ LIBRARY DESTINATION ${LIB_INSTALL_DIR} ++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + endif(INSTALL_STATIC) + endif(BUILD_STATIC) + +@@ -57,3 +62,9 @@ if(BUILD_SHARED OR INSTALL_STATIC) + install(FILES ${chipmunk_public_header} DESTINATION include/chipmunk) + install(FILES ${chipmunk_constraint_header} DESTINATION include/chipmunk/constraints) + endif(BUILD_SHARED OR INSTALL_STATIC) ++ ++install(EXPORT unofficial-chipmunk-config ++ FILE unofficial-chipmunk-config.cmake ++ NAMESPACE unofficial::chipmunk:: ++ DESTINATION share/unofficial-chipmunk ++) |