From bb1dadd65dcba75c85c7350519fc70b9077f5601 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Wed, 8 Jun 2022 20:14:04 +0200 Subject: [PATCH 1/4] [cvtt] Add port. --- ports/cvtt/CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++ ports/cvtt/portfile.cmake | 21 ++++++++++ ports/cvtt/vcpkg.json | 17 ++++++++ versions/baseline.json | 4 ++ versions/c-/cvtt.json | 9 +++++ 5 files changed, 133 insertions(+) create mode 100644 ports/cvtt/CMakeLists.txt create mode 100644 ports/cvtt/portfile.cmake create mode 100644 ports/cvtt/vcpkg.json create mode 100644 versions/c-/cvtt.json diff --git a/ports/cvtt/CMakeLists.txt b/ports/cvtt/CMakeLists.txt new file mode 100644 index 00000000000000..1393e185678a61 --- /dev/null +++ b/ports/cvtt/CMakeLists.txt @@ -0,0 +1,82 @@ +cmake_minimum_required(VERSION 3.3.0) + +project( cvtt ) + +set( ${PROJECT_NAME}_SRC_FILES + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_API.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC6H_IO.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC7_PrioData.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC67.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BCCommon.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_IndexSelector.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_S3TC.cpp + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_Util.cpp +) +set( ${PROJECT_NAME}_HDR_FILES + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_AggregatedError.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC6H_IO.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC7_Prio.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC7_SingleColor.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC67.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BCCommon.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_EndpointRefiner.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_EndpointSelector.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC1.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC2.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC2_Rounding.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_FakeBT709_Rounding.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_IndexSelector.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_IndexSelectorHDR.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_PackedCovarianceMatrix.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ParallelMath.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_S3TC.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_S3TC_SingleColor.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_UnfinishedEndpoints.h + ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_Util.h +) +source_group( "Header Files" FILES ${${PROJECT_NAME}_HDR_FILES} ) +source_group( "Source Files" FILES ${${PROJECT_NAME}_SRC_FILES} ) +add_library( + ${PROJECT_NAME} + STATIC + ${${PROJECT_NAME}_HDR_FILES} + ${${PROJECT_NAME}_SRC_FILES} +) +add_library( cvtt::${PROJECT_NAME} + ALIAS + ${PROJECT_NAME} +) +target_include_directories( ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_LIST_DIR} +) +install( + TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" +) +if (NOT DEFINED SKIP_HEADERS) + install( + FILES ${${PROJECT_NAME}_HDR_FILES} + DESTINATION include/cvtt + ) +endif() + +install( + TARGETS cvtt + COMPONENT cvtt + EXPORT cvtt + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +install( EXPORT cvtt + FILE cvttConfig.cmake + COMPONENT cvtt + NAMESPACE cvtt:: + DESTINATION lib/cmake/cvtt +) diff --git a/ports/cvtt/portfile.cmake b/ports/cvtt/portfile.cmake new file mode 100644 index 00000000000000..5a58c50a6c04a3 --- /dev/null +++ b/ports/cvtt/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO elasota/ConvectionKernels + REF dc2dbbe0ae2cf2be06ef56d1021e2222a56c7fe2 + SHA512 2bf3aff1acb7b2365b882b4c1274ea8bcb9aea3015b5009e0ec50279122ecc623074d0f4fa04ddf8cd457e1f6868075a773bf8a2fa5b4fa9e2fd51d0a76d2560 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cvtt) + +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/cvtt/vcpkg.json b/ports/cvtt/vcpkg.json new file mode 100644 index 00000000000000..353f817c28bb6b --- /dev/null +++ b/ports/cvtt/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cvtt", + "version-date": "2022-06-08", + "description": "Fast, high-quality texture compression library for many formats ", + "homepage": "https://github.com/elasota/ConvectionKernels", + "license": null, + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 9757917e198011..c44499beb2503f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1764,6 +1764,10 @@ "baseline": "2.12.0", "port-version": 2 }, + "cvtt": { + "baseline": "2022-06-08", + "port-version": 0 + }, "cwalk": { "baseline": "1.2.6", "port-version": 0 diff --git a/versions/c-/cvtt.json b/versions/c-/cvtt.json new file mode 100644 index 00000000000000..b22298c0da1e84 --- /dev/null +++ b/versions/c-/cvtt.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "bc1fd98dea0141eb933358dd88cfff61c92831da", + "version-date": "2022-06-08", + "port-version": 0 + } + ] +} From db8b5b5dedf4015088c44fa0ac34b5a8f73744d9 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Thu, 9 Jun 2022 09:57:28 +0200 Subject: [PATCH 2/4] [cvtt] Modified to unofficial-cvtt --- ports/cvtt/CMakeLists.txt | 51 ++++++++++++--------------------------- ports/cvtt/portfile.cmake | 2 +- versions/c-/cvtt.json | 2 +- 3 files changed, 18 insertions(+), 37 deletions(-) diff --git a/ports/cvtt/CMakeLists.txt b/ports/cvtt/CMakeLists.txt index 1393e185678a61..8c3a4e640d7357 100644 --- a/ports/cvtt/CMakeLists.txt +++ b/ports/cvtt/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.3.0) project( cvtt ) -set( ${PROJECT_NAME}_SRC_FILES +set( SRC_FILES ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_API.cpp ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC6H_IO.cpp ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC7_PrioData.cpp @@ -13,7 +13,7 @@ set( ${PROJECT_NAME}_SRC_FILES ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_S3TC.cpp ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_Util.cpp ) -set( ${PROJECT_NAME}_HDR_FILES +set( HDR_FILES ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels.h ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_AggregatedError.h ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC6H_IO.h @@ -37,46 +37,27 @@ set( ${PROJECT_NAME}_HDR_FILES ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_UnfinishedEndpoints.h ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_Util.h ) -source_group( "Header Files" FILES ${${PROJECT_NAME}_HDR_FILES} ) -source_group( "Source Files" FILES ${${PROJECT_NAME}_SRC_FILES} ) -add_library( - ${PROJECT_NAME} +add_library( ${PROJECT_NAME} STATIC - ${${PROJECT_NAME}_HDR_FILES} - ${${PROJECT_NAME}_SRC_FILES} + ${HDR_FILES} + ${SRC_FILES} ) -add_library( cvtt::${PROJECT_NAME} - ALIAS - ${PROJECT_NAME} +set_property( TARGET ${PROJECT_NAME} + PROPERTY PUBLIC_HEADER ${HDR_FILES} ) target_include_directories( ${PROJECT_NAME} - PRIVATE - ${CMAKE_CURRENT_LIST_DIR} + PRIVATE ${CMAKE_CURRENT_LIST_DIR} + INTERFACE $ ) -install( - TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION "bin" - LIBRARY DESTINATION "lib" - ARCHIVE DESTINATION "lib" -) -if (NOT DEFINED SKIP_HEADERS) - install( - FILES ${${PROJECT_NAME}_HDR_FILES} - DESTINATION include/cvtt - ) -endif() - -install( - TARGETS cvtt - COMPONENT cvtt - EXPORT cvtt +install( TARGETS ${PROJECT_NAME} + EXPORT unofficial-cvtt-config RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include/cvtt ) -install( EXPORT cvtt - FILE cvttConfig.cmake - COMPONENT cvtt - NAMESPACE cvtt:: - DESTINATION lib/cmake/cvtt +install( EXPORT unofficial-cvtt-config + FILE unofficial-cvtt-config.cmake + NAMESPACE unofficial::cvtt:: + DESTINATION share/unofficial-cvtt ) diff --git a/ports/cvtt/portfile.cmake b/ports/cvtt/portfile.cmake index 5a58c50a6c04a3..576e5ce68a3388 100644 --- a/ports/cvtt/portfile.cmake +++ b/ports/cvtt/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/cvtt) +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-cvtt) 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/versions/c-/cvtt.json b/versions/c-/cvtt.json index b22298c0da1e84..e6f0145327aa5b 100644 --- a/versions/c-/cvtt.json +++ b/versions/c-/cvtt.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "bc1fd98dea0141eb933358dd88cfff61c92831da", + "git-tree": "afc83bed7d74230dac216f39068be5f0fbba04a9", "version-date": "2022-06-08", "port-version": 0 } From 29eecf923b4816f72d94141b37d24bc7a27858d4 Mon Sep 17 00:00:00 2001 From: Sylvain Doremus Date: Thu, 9 Jun 2022 17:21:19 +0200 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Robert Schumacher --- ports/cvtt/CMakeLists.txt | 37 ++----------------------------------- ports/cvtt/vcpkg.json | 4 ++-- versions/c-/cvtt.json | 2 +- 3 files changed, 5 insertions(+), 38 deletions(-) diff --git a/ports/cvtt/CMakeLists.txt b/ports/cvtt/CMakeLists.txt index 8c3a4e640d7357..c1b99e8158e3cd 100644 --- a/ports/cvtt/CMakeLists.txt +++ b/ports/cvtt/CMakeLists.txt @@ -2,41 +2,8 @@ cmake_minimum_required(VERSION 3.3.0) project( cvtt ) -set( SRC_FILES - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_API.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC6H_IO.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC7_PrioData.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC67.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BCCommon.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_IndexSelector.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_S3TC.cpp - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_Util.cpp -) -set( HDR_FILES - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_AggregatedError.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC6H_IO.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC7_Prio.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC7_SingleColor.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BC67.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_BCCommon.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_EndpointRefiner.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_EndpointSelector.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC1.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC2.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ETC2_Rounding.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_FakeBT709_Rounding.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_IndexSelector.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_IndexSelectorHDR.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_PackedCovarianceMatrix.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_ParallelMath.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_S3TC.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_S3TC_SingleColor.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_UnfinishedEndpoints.h - ${CMAKE_CURRENT_LIST_DIR}/ConvectionKernels_Util.h -) +file(GLOB SRC_FILES *.cpp) +file(GLOB HDR_FILES *.h) add_library( ${PROJECT_NAME} STATIC ${HDR_FILES} diff --git a/ports/cvtt/vcpkg.json b/ports/cvtt/vcpkg.json index 353f817c28bb6b..b43e3244c50290 100644 --- a/ports/cvtt/vcpkg.json +++ b/ports/cvtt/vcpkg.json @@ -1,7 +1,7 @@ { - "name": "cvtt", + "name": "convectionkernels", "version-date": "2022-06-08", - "description": "Fast, high-quality texture compression library for many formats ", + "description": "Fast, high-quality texture compression library for many formats, also known as cvtt", "homepage": "https://github.com/elasota/ConvectionKernels", "license": null, "dependencies": [ diff --git a/versions/c-/cvtt.json b/versions/c-/cvtt.json index e6f0145327aa5b..4c353bc5623d84 100644 --- a/versions/c-/cvtt.json +++ b/versions/c-/cvtt.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "afc83bed7d74230dac216f39068be5f0fbba04a9", + "git-tree": "4674907ed9d68777b1d8f6dca126fab50173dc8b", "version-date": "2022-06-08", "port-version": 0 } From 7de9b78e360e8a563cba883a7380024f63a371e1 Mon Sep 17 00:00:00 2001 From: DragonJoker Date: Thu, 9 Jun 2022 17:27:56 +0200 Subject: [PATCH 4/4] [cvtt] Renamed to convectionkernels --- ports/{cvtt => convectionkernels}/CMakeLists.txt | 14 +++++++------- ports/{cvtt => convectionkernels}/portfile.cmake | 2 +- ports/{cvtt => convectionkernels}/vcpkg.json | 0 versions/baseline.json | 8 ++++---- versions/c-/{cvtt.json => convectionkernels.json} | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) rename ports/{cvtt => convectionkernels}/CMakeLists.txt (59%) rename ports/{cvtt => convectionkernels}/portfile.cmake (90%) rename ports/{cvtt => convectionkernels}/vcpkg.json (100%) rename versions/c-/{cvtt.json => convectionkernels.json} (60%) diff --git a/ports/cvtt/CMakeLists.txt b/ports/convectionkernels/CMakeLists.txt similarity index 59% rename from ports/cvtt/CMakeLists.txt rename to ports/convectionkernels/CMakeLists.txt index c1b99e8158e3cd..9b289bdcbc2aa4 100644 --- a/ports/cvtt/CMakeLists.txt +++ b/ports/convectionkernels/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.3.0) -project( cvtt ) +project( convectionkernels ) file(GLOB SRC_FILES *.cpp) file(GLOB HDR_FILES *.h) @@ -17,14 +17,14 @@ target_include_directories( ${PROJECT_NAME} INTERFACE $ ) install( TARGETS ${PROJECT_NAME} - EXPORT unofficial-cvtt-config + EXPORT unofficial-convectionkernels-config RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib - PUBLIC_HEADER DESTINATION include/cvtt + PUBLIC_HEADER DESTINATION include/convectionkernels ) -install( EXPORT unofficial-cvtt-config - FILE unofficial-cvtt-config.cmake - NAMESPACE unofficial::cvtt:: - DESTINATION share/unofficial-cvtt +install( EXPORT unofficial-convectionkernels-config + FILE unofficial-convectionkernels-config.cmake + NAMESPACE unofficial::convectionkernels:: + DESTINATION share/unofficial-convectionkernels ) diff --git a/ports/cvtt/portfile.cmake b/ports/convectionkernels/portfile.cmake similarity index 90% rename from ports/cvtt/portfile.cmake rename to ports/convectionkernels/portfile.cmake index 576e5ce68a3388..9ea14cd5bd056a 100644 --- a/ports/cvtt/portfile.cmake +++ b/ports/convectionkernels/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-cvtt) +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-convectionkernels) 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/cvtt/vcpkg.json b/ports/convectionkernels/vcpkg.json similarity index 100% rename from ports/cvtt/vcpkg.json rename to ports/convectionkernels/vcpkg.json diff --git a/versions/baseline.json b/versions/baseline.json index c44499beb2503f..ca5d2afa904e8c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1548,6 +1548,10 @@ "baseline": "4.1.0", "port-version": 0 }, + "convectionkernels": { + "baseline": "2022-06-08", + "port-version": 0 + }, "coolprop": { "baseline": "6.4.1", "port-version": 1 @@ -1764,10 +1768,6 @@ "baseline": "2.12.0", "port-version": 2 }, - "cvtt": { - "baseline": "2022-06-08", - "port-version": 0 - }, "cwalk": { "baseline": "1.2.6", "port-version": 0 diff --git a/versions/c-/cvtt.json b/versions/c-/convectionkernels.json similarity index 60% rename from versions/c-/cvtt.json rename to versions/c-/convectionkernels.json index 4c353bc5623d84..3595b1b8028ac0 100644 --- a/versions/c-/cvtt.json +++ b/versions/c-/convectionkernels.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4674907ed9d68777b1d8f6dca126fab50173dc8b", + "git-tree": "cf21fe054d62c4602edd8566bb5d2f92b1bc1734", "version-date": "2022-06-08", "port-version": 0 }