From 2d99a63a5a6d17488c62304b01275980f89fc3b0 Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Fri, 23 Feb 2024 01:53:59 +0330 Subject: [PATCH 01/12] [OpenFX] New Port --- ...001-add-cmake-support-to-version-1.4.patch | 107 ++++++++++++++++++ ports/openfx/portfile.cmake | 22 ++++ ports/openfx/vcpkg.json | 19 ++++ versions/baseline.json | 4 + versions/o-/openfx.json | 9 ++ 5 files changed, 161 insertions(+) create mode 100644 ports/openfx/0001-add-cmake-support-to-version-1.4.patch create mode 100644 ports/openfx/portfile.cmake create mode 100644 ports/openfx/vcpkg.json create mode 100644 versions/o-/openfx.json diff --git a/ports/openfx/0001-add-cmake-support-to-version-1.4.patch b/ports/openfx/0001-add-cmake-support-to-version-1.4.patch new file mode 100644 index 00000000000000..773544e7e89837 --- /dev/null +++ b/ports/openfx/0001-add-cmake-support-to-version-1.4.patch @@ -0,0 +1,107 @@ +From e2bf1da1740ea3147eae04847c20f2ca40678039 Mon Sep 17 00:00:00 2001 +From: Reza Alizadeh Majd +Date: Sun, 24 Mar 2024 21:32:54 +0330 +Subject: [PATCH] add cmake support to version 1.4 + +--- + CMakeLists.txt | 58 ++++++++++++++++++++++++++++++++++++++++++ + Support/CMakeLists.txt | 21 +++++++++++++++ + 2 files changed, 79 insertions(+) + create mode 100644 CMakeLists.txt + create mode 100644 Support/CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..b635cd3 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,58 @@ ++cmake_minimum_required(VERSION 3.20) ++ ++project(openfx VERSION 1.4.0 LANGUAGES CXX) ++ ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++ ++if(WIN32) ++ add_compile_definitions(WINDOWS) ++ add_compile_options(/DNOMINMAX) ++ add_definitions(-DWIN64) ++ set(OS_VAR "windows") ++ set(OFX_ARCH_NAME "Win64") ++endif() ++ ++set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_HEADERS_DIR") ++include_directories(${OFX_HEADERS_DIR}) ++ ++add_library(OpenFx INTERFACE) ++ ++add_subdirectory(Support) ++ ++install( ++ TARGETS OpenFx OfxSupport ++ EXPORT openfx-export ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++ ++install( ++ EXPORT openfx-export ++ FILE openfxTargets.cmake ++ NAMESPACE OpenFx:: ++ DESTINATION "lib/cmake/openfx" ++) ++ ++install( ++ DIRECTORY ${OFX_HEADERS_DIR}/ ++ DESTINATION include ++ FILES_MATCHING PATTERN "*.h" ++) ++install( ++ DIRECTORY ${OFX_SUPPORT_HEADERS_DIR}/ ++ DESTINATION include ++ FILES_MATCHING PATTERN "*.h" ++) ++ ++include(CMakePackageConfigHelpers) ++ ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" ++ VERSION ${PROJECT_VERSION} ++ COMPATIBILITY AnyNewerVersion ++) ++install( ++ FILES "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" ++ DESTINATION "lib/cmake/openfx" ++) +\ No newline at end of file +diff --git a/Support/CMakeLists.txt b/Support/CMakeLists.txt +new file mode 100644 +index 0000000..0116ac7 +--- /dev/null ++++ b/Support/CMakeLists.txt +@@ -0,0 +1,21 @@ ++add_library(OfxSupport STATIC ++ Library/ofxsCore.cpp ++ Library/ofxsImageEffect.cpp ++ Library/ofxsInteract.cpp ++ Library/ofxsLog.cpp ++ Library/ofxsMultiThread.cpp ++ Library/ofxsParams.cpp ++ Library/ofxsProperty.cpp ++ Library/ofxsPropertyValidation.cpp ++) ++ ++set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_SUPPORT_HEADERS_DIR") ++target_include_directories(OfxSupport ++ PUBLIC ++ $ ++ $ ++) ++ ++target_link_libraries(OfxSupport PUBLIC OpenFx) ++ ++target_compile_features(OfxSupport PUBLIC cxx_std_11) +-- +2.44.0 + diff --git a/ports/openfx/portfile.cmake b/ports/openfx/portfile.cmake new file mode 100644 index 00000000000000..b203cbe33d2e17 --- /dev/null +++ b/ports/openfx/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AcademySoftwareFoundation/openfx + REF OFX_Release_1_4_TAG + SHA512 b20512ea38823167f191b72f1592548df85fbda6cefe47673972874c139641ee91277e78c1e0d57a457b9f864385e6fa0e4a7edcdbf0c7b2eda956c03a3e1e13 + HEAD_REF main + PATCHES + 0001-add-cmake-support-to-version-1.4.patch +) + +vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}) +vcpkg_cmake_install() +vcpkg_fixup_pkgconfig() +vcpkg_cmake_config_fixup( + PACKAGE_NAME openfx + CONFIG_PATH lib/cmake/openfx +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/DocSrc") + +file(INSTALL "${SOURCE_PATH}/Support/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/openfx" RENAME copyright) diff --git a/ports/openfx/vcpkg.json b/ports/openfx/vcpkg.json new file mode 100644 index 00000000000000..33634ae585c0d2 --- /dev/null +++ b/ports/openfx/vcpkg.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "openfx", + "version": "1.4", + "maintainers": "Reza Alizadeh Majd , Behnam Binesh ", + "summary": "OpenFX - An open-source plugin API for visual effects", + "homepage": "https://github.com/AcademySoftwareFoundation/openfx", + "license": "BSD-3-Clause", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index df285840dbefda..931f1d1caef183 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6364,6 +6364,10 @@ "baseline": "2022-07-18", "port-version": 0 }, + "openfx": { + "baseline": "1.4", + "port-version": 0 + }, "opengl": { "baseline": "2022-12-04", "port-version": 3 diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json new file mode 100644 index 00000000000000..1cbe6f13f93fff --- /dev/null +++ b/versions/o-/openfx.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "b65141be4f0d468b09593d4af8946fc54a6ae6d6", + "version": "1.4", + "port-version": 0 + } + ] +} From 0ce1893ccff0c840ef918bbdb387cc5281929d98 Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Wed, 27 Mar 2024 19:52:55 +0330 Subject: [PATCH 02/12] [openfx]: extract patch file to separated cmake files --- ...001-add-cmake-support-to-version-1.4.patch | 107 ------------------ ports/openfx/Openfx.cmake | 58 ++++++++++ ports/openfx/Support.cmake | 21 ++++ ports/openfx/portfile.cmake | 5 +- versions/o-/openfx.json | 2 +- 5 files changed, 83 insertions(+), 110 deletions(-) delete mode 100644 ports/openfx/0001-add-cmake-support-to-version-1.4.patch create mode 100644 ports/openfx/Openfx.cmake create mode 100644 ports/openfx/Support.cmake diff --git a/ports/openfx/0001-add-cmake-support-to-version-1.4.patch b/ports/openfx/0001-add-cmake-support-to-version-1.4.patch deleted file mode 100644 index 773544e7e89837..00000000000000 --- a/ports/openfx/0001-add-cmake-support-to-version-1.4.patch +++ /dev/null @@ -1,107 +0,0 @@ -From e2bf1da1740ea3147eae04847c20f2ca40678039 Mon Sep 17 00:00:00 2001 -From: Reza Alizadeh Majd -Date: Sun, 24 Mar 2024 21:32:54 +0330 -Subject: [PATCH] add cmake support to version 1.4 - ---- - CMakeLists.txt | 58 ++++++++++++++++++++++++++++++++++++++++++ - Support/CMakeLists.txt | 21 +++++++++++++++ - 2 files changed, 79 insertions(+) - create mode 100644 CMakeLists.txt - create mode 100644 Support/CMakeLists.txt - -diff --git a/CMakeLists.txt b/CMakeLists.txt -new file mode 100644 -index 0000000..b635cd3 ---- /dev/null -+++ b/CMakeLists.txt -@@ -0,0 +1,58 @@ -+cmake_minimum_required(VERSION 3.20) -+ -+project(openfx VERSION 1.4.0 LANGUAGES CXX) -+ -+set(CMAKE_CXX_STANDARD 11) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+if(WIN32) -+ add_compile_definitions(WINDOWS) -+ add_compile_options(/DNOMINMAX) -+ add_definitions(-DWIN64) -+ set(OS_VAR "windows") -+ set(OFX_ARCH_NAME "Win64") -+endif() -+ -+set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_HEADERS_DIR") -+include_directories(${OFX_HEADERS_DIR}) -+ -+add_library(OpenFx INTERFACE) -+ -+add_subdirectory(Support) -+ -+install( -+ TARGETS OpenFx OfxSupport -+ EXPORT openfx-export -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib -+) -+ -+install( -+ EXPORT openfx-export -+ FILE openfxTargets.cmake -+ NAMESPACE OpenFx:: -+ DESTINATION "lib/cmake/openfx" -+) -+ -+install( -+ DIRECTORY ${OFX_HEADERS_DIR}/ -+ DESTINATION include -+ FILES_MATCHING PATTERN "*.h" -+) -+install( -+ DIRECTORY ${OFX_SUPPORT_HEADERS_DIR}/ -+ DESTINATION include -+ FILES_MATCHING PATTERN "*.h" -+) -+ -+include(CMakePackageConfigHelpers) -+ -+write_basic_package_version_file( -+ "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" -+ VERSION ${PROJECT_VERSION} -+ COMPATIBILITY AnyNewerVersion -+) -+install( -+ FILES "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" -+ DESTINATION "lib/cmake/openfx" -+) -\ No newline at end of file -diff --git a/Support/CMakeLists.txt b/Support/CMakeLists.txt -new file mode 100644 -index 0000000..0116ac7 ---- /dev/null -+++ b/Support/CMakeLists.txt -@@ -0,0 +1,21 @@ -+add_library(OfxSupport STATIC -+ Library/ofxsCore.cpp -+ Library/ofxsImageEffect.cpp -+ Library/ofxsInteract.cpp -+ Library/ofxsLog.cpp -+ Library/ofxsMultiThread.cpp -+ Library/ofxsParams.cpp -+ Library/ofxsProperty.cpp -+ Library/ofxsPropertyValidation.cpp -+) -+ -+set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_SUPPORT_HEADERS_DIR") -+target_include_directories(OfxSupport -+ PUBLIC -+ $ -+ $ -+) -+ -+target_link_libraries(OfxSupport PUBLIC OpenFx) -+ -+target_compile_features(OfxSupport PUBLIC cxx_std_11) --- -2.44.0 - diff --git a/ports/openfx/Openfx.cmake b/ports/openfx/Openfx.cmake new file mode 100644 index 00000000000000..b635cd36713272 --- /dev/null +++ b/ports/openfx/Openfx.cmake @@ -0,0 +1,58 @@ +cmake_minimum_required(VERSION 3.20) + +project(openfx VERSION 1.4.0 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +if(WIN32) + add_compile_definitions(WINDOWS) + add_compile_options(/DNOMINMAX) + add_definitions(-DWIN64) + set(OS_VAR "windows") + set(OFX_ARCH_NAME "Win64") +endif() + +set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_HEADERS_DIR") +include_directories(${OFX_HEADERS_DIR}) + +add_library(OpenFx INTERFACE) + +add_subdirectory(Support) + +install( + TARGETS OpenFx OfxSupport + EXPORT openfx-export + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT openfx-export + FILE openfxTargets.cmake + NAMESPACE OpenFx:: + DESTINATION "lib/cmake/openfx" +) + +install( + DIRECTORY ${OFX_HEADERS_DIR}/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" +) +install( + DIRECTORY ${OFX_SUPPORT_HEADERS_DIR}/ + DESTINATION include + FILES_MATCHING PATTERN "*.h" +) + +include(CMakePackageConfigHelpers) + +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion +) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" + DESTINATION "lib/cmake/openfx" +) \ No newline at end of file diff --git a/ports/openfx/Support.cmake b/ports/openfx/Support.cmake new file mode 100644 index 00000000000000..0116ac7078ad40 --- /dev/null +++ b/ports/openfx/Support.cmake @@ -0,0 +1,21 @@ +add_library(OfxSupport STATIC + Library/ofxsCore.cpp + Library/ofxsImageEffect.cpp + Library/ofxsInteract.cpp + Library/ofxsLog.cpp + Library/ofxsMultiThread.cpp + Library/ofxsParams.cpp + Library/ofxsProperty.cpp + Library/ofxsPropertyValidation.cpp +) + +set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_SUPPORT_HEADERS_DIR") +target_include_directories(OfxSupport + PUBLIC + $ + $ +) + +target_link_libraries(OfxSupport PUBLIC OpenFx) + +target_compile_features(OfxSupport PUBLIC cxx_std_11) diff --git a/ports/openfx/portfile.cmake b/ports/openfx/portfile.cmake index b203cbe33d2e17..68d1ad4ecf5053 100644 --- a/ports/openfx/portfile.cmake +++ b/ports/openfx/portfile.cmake @@ -4,10 +4,11 @@ vcpkg_from_github( REF OFX_Release_1_4_TAG SHA512 b20512ea38823167f191b72f1592548df85fbda6cefe47673972874c139641ee91277e78c1e0d57a457b9f864385e6fa0e4a7edcdbf0c7b2eda956c03a3e1e13 HEAD_REF main - PATCHES - 0001-add-cmake-support-to-version-1.4.patch ) +file(COPY_FILE ${CMAKE_CURRENT_LIST_DIR}/Openfx.cmake ${SOURCE_PATH}/CMakeLists.txt) +file(COPY_FILE ${CMAKE_CURRENT_LIST_DIR}/Support.cmake ${SOURCE_PATH}/Support/CMakeLists.txt) + vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}) vcpkg_cmake_install() vcpkg_fixup_pkgconfig() diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index 1cbe6f13f93fff..564612b7cb9e06 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "b65141be4f0d468b09593d4af8946fc54a6ae6d6", + "git-tree": "51580b5a6f0e6f7e0f143bc5afd9f68378c3be82", "version": "1.4", "port-version": 0 } From 7492fa402256908e2534ea04b033250a02f9708b Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Thu, 28 Mar 2024 15:46:03 +0330 Subject: [PATCH 03/12] [OpenFX]: mark library target as unofficial --- ports/openfx/Openfx.cmake | 14 +++++++------- versions/o-/openfx.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ports/openfx/Openfx.cmake b/ports/openfx/Openfx.cmake index b635cd36713272..bc8b3fb622909e 100644 --- a/ports/openfx/Openfx.cmake +++ b/ports/openfx/Openfx.cmake @@ -29,9 +29,9 @@ install( install( EXPORT openfx-export - FILE openfxTargets.cmake - NAMESPACE OpenFx:: - DESTINATION "lib/cmake/openfx" + FILE unofficial-openfxTargets.cmake + NAMESPACE unofficial::OpenFx:: + DESTINATION "lib/cmake/unofficial-openfx" ) install( @@ -48,11 +48,11 @@ install( include(CMakePackageConfigHelpers) write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/unofficial-openfxConfigVersion.cmake" VERSION ${PROJECT_VERSION} COMPATIBILITY AnyNewerVersion ) install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/openfxConfigVersion.cmake" - DESTINATION "lib/cmake/openfx" -) \ No newline at end of file + FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-openfxConfigVersion.cmake" + DESTINATION "lib/cmake/unofficial-openfx" +) diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index 564612b7cb9e06..028c33cf90d672 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "51580b5a6f0e6f7e0f143bc5afd9f68378c3be82", + "git-tree": "efa5fc5422bffe977a71caa4f3babb4744a77734", "version": "1.4", "port-version": 0 } From 246e86f7ea91dd74b20a0131dcaf4f8e1c0b422b Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Thu, 28 Mar 2024 16:00:50 +0330 Subject: [PATCH 04/12] [OpenFX]: add usage document --- ports/openfx/portfile.cmake | 3 ++- ports/openfx/usage | 4 ++++ versions/o-/openfx.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 ports/openfx/usage diff --git a/ports/openfx/portfile.cmake b/ports/openfx/portfile.cmake index 68d1ad4ecf5053..2671efdd3b262a 100644 --- a/ports/openfx/portfile.cmake +++ b/ports/openfx/portfile.cmake @@ -14,10 +14,11 @@ vcpkg_cmake_install() vcpkg_fixup_pkgconfig() vcpkg_cmake_config_fixup( PACKAGE_NAME openfx - CONFIG_PATH lib/cmake/openfx + CONFIG_PATH lib/cmake/unofficial-openfx ) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/DocSrc") +configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) file(INSTALL "${SOURCE_PATH}/Support/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/openfx" RENAME copyright) diff --git a/ports/openfx/usage b/ports/openfx/usage new file mode 100644 index 00000000000000..6e2b7b0a88137e --- /dev/null +++ b/ports/openfx/usage @@ -0,0 +1,4 @@ +The package OpenFX provides CMake targets: + + find_package(OpenFx CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::OpenFx::OpenFx) diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index 028c33cf90d672..a068504017aa2d 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "efa5fc5422bffe977a71caa4f3babb4744a77734", + "git-tree": "7f32a072ef4c6f7efa418caeb90359f201c57fda", "version": "1.4", "port-version": 0 } From 74703ff471f46e4caee9314f3d9c915738ede854 Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Fri, 29 Mar 2024 15:03:06 +0330 Subject: [PATCH 05/12] [OpenFX]: apply vcpkg submission review related changed https://github.com/microsoft/vcpkg/pull/37670#pullrequestreview-1967807962 --- ports/openfx/Openfx.cmake | 18 ++++++------------ ports/openfx/Support.cmake | 4 ++-- ports/openfx/portfile.cmake | 5 +---- ports/openfx/usage | 2 +- versions/o-/openfx.json | 2 +- 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/ports/openfx/Openfx.cmake b/ports/openfx/Openfx.cmake index bc8b3fb622909e..8875dd8ca26754 100644 --- a/ports/openfx/Openfx.cmake +++ b/ports/openfx/Openfx.cmake @@ -29,20 +29,14 @@ install( install( EXPORT openfx-export - FILE unofficial-openfxTargets.cmake + FILE unofficial-openfxConfig.cmake NAMESPACE unofficial::OpenFx:: - DESTINATION "lib/cmake/unofficial-openfx" + DESTINATION "share/unofficial-openfx" ) -install( - DIRECTORY ${OFX_HEADERS_DIR}/ - DESTINATION include - FILES_MATCHING PATTERN "*.h" -) -install( - DIRECTORY ${OFX_SUPPORT_HEADERS_DIR}/ - DESTINATION include - FILES_MATCHING PATTERN "*.h" +file(GLOB OFX_HEADERS "${OFX_HEADERS_DIR}/*.h" "${OFX_SUPPORT_HEADERS_DIR}/*.h") +install(FILES ${OFX_HEADERS} + DESTINATION include/openfx ) include(CMakePackageConfigHelpers) @@ -54,5 +48,5 @@ write_basic_package_version_file( ) install( FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-openfxConfigVersion.cmake" - DESTINATION "lib/cmake/unofficial-openfx" + DESTINATION "share/unofficial-openfx" ) diff --git a/ports/openfx/Support.cmake b/ports/openfx/Support.cmake index 0116ac7078ad40..5436797552da11 100644 --- a/ports/openfx/Support.cmake +++ b/ports/openfx/Support.cmake @@ -13,9 +13,9 @@ set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL " target_include_directories(OfxSupport PUBLIC $ - $ + $ ) -target_link_libraries(OfxSupport PUBLIC OpenFx) +target_link_libraries(OfxSupport INTERFACE OpenFx) target_compile_features(OfxSupport PUBLIC cxx_std_11) diff --git a/ports/openfx/portfile.cmake b/ports/openfx/portfile.cmake index 2671efdd3b262a..76ec701e759170 100644 --- a/ports/openfx/portfile.cmake +++ b/ports/openfx/portfile.cmake @@ -12,10 +12,7 @@ file(COPY_FILE ${CMAKE_CURRENT_LIST_DIR}/Support.cmake ${SOURCE_PATH}/Support/CM vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}) vcpkg_cmake_install() vcpkg_fixup_pkgconfig() -vcpkg_cmake_config_fixup( - PACKAGE_NAME openfx - CONFIG_PATH lib/cmake/unofficial-openfx -) +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-openfx) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/DocSrc") diff --git a/ports/openfx/usage b/ports/openfx/usage index 6e2b7b0a88137e..da8f37b452a371 100644 --- a/ports/openfx/usage +++ b/ports/openfx/usage @@ -1,4 +1,4 @@ The package OpenFX provides CMake targets: - find_package(OpenFx CONFIG REQUIRED) + find_package(unofficial-openfx CONFIG REQUIRED) target_link_libraries(main PRIVATE unofficial::OpenFx::OpenFx) diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index a068504017aa2d..33deed3ff5c4bb 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7f32a072ef4c6f7efa418caeb90359f201c57fda", + "git-tree": "3c893dd0d9c40b88eafed619ed0fc3d295cbaddd", "version": "1.4", "port-version": 0 } From dcd294fdfae901c464d339e7d672a3e3f385dbda Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Sat, 6 Apr 2024 20:50:22 +0330 Subject: [PATCH 06/12] [OpenFX]: update port usage document --- ports/openfx/Support.cmake | 42 +++++++++++++++++++------------------- ports/openfx/usage | 3 ++- versions/o-/openfx.json | 2 +- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ports/openfx/Support.cmake b/ports/openfx/Support.cmake index 5436797552da11..a66b7e2ee34fbb 100644 --- a/ports/openfx/Support.cmake +++ b/ports/openfx/Support.cmake @@ -1,21 +1,21 @@ -add_library(OfxSupport STATIC - Library/ofxsCore.cpp - Library/ofxsImageEffect.cpp - Library/ofxsInteract.cpp - Library/ofxsLog.cpp - Library/ofxsMultiThread.cpp - Library/ofxsParams.cpp - Library/ofxsProperty.cpp - Library/ofxsPropertyValidation.cpp -) - -set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_SUPPORT_HEADERS_DIR") -target_include_directories(OfxSupport - PUBLIC - $ - $ -) - -target_link_libraries(OfxSupport INTERFACE OpenFx) - -target_compile_features(OfxSupport PUBLIC cxx_std_11) +add_library(OfxSupport STATIC + Library/ofxsCore.cpp + Library/ofxsImageEffect.cpp + Library/ofxsInteract.cpp + Library/ofxsLog.cpp + Library/ofxsMultiThread.cpp + Library/ofxsParams.cpp + Library/ofxsProperty.cpp + Library/ofxsPropertyValidation.cpp +) + +set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_SUPPORT_HEADERS_DIR") +target_include_directories(OfxSupport + PUBLIC + $ + $ +) + +target_link_libraries(OfxSupport INTERFACE OpenFx) + +target_compile_features(OfxSupport PUBLIC cxx_std_11) diff --git a/ports/openfx/usage b/ports/openfx/usage index da8f37b452a371..1cd881fd3ef2e1 100644 --- a/ports/openfx/usage +++ b/ports/openfx/usage @@ -1,4 +1,5 @@ The package OpenFX provides CMake targets: find_package(unofficial-openfx CONFIG REQUIRED) - target_link_libraries(main PRIVATE unofficial::OpenFx::OpenFx) + target_link_libraries(main PRIVATE unofficial::OpenFx::OpenFx) # to use the C-based API + target_link_libraries(main PRIVATE unofficial::OpenFx::OfxSupport) # to use the C++ wrapper diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index 33deed3ff5c4bb..228c77f593a1ae 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "3c893dd0d9c40b88eafed619ed0fc3d295cbaddd", + "git-tree": "a8a5d1f89c088f9a3ff94f47248b9f3a3377559f", "version": "1.4", "port-version": 0 } From 87c57bd01405ad455792c328217aeff418ba9abe Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Mon, 8 Apr 2024 16:37:49 +0330 Subject: [PATCH 07/12] [OpenFX]: upate line endings --- ports/openfx/Openfx.cmake | 104 +++++++++++++++++++------------------- ports/openfx/usage | 10 ++-- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/ports/openfx/Openfx.cmake b/ports/openfx/Openfx.cmake index 8875dd8ca26754..e44bf164f448c5 100644 --- a/ports/openfx/Openfx.cmake +++ b/ports/openfx/Openfx.cmake @@ -1,52 +1,52 @@ -cmake_minimum_required(VERSION 3.20) - -project(openfx VERSION 1.4.0 LANGUAGES CXX) - -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -if(WIN32) - add_compile_definitions(WINDOWS) - add_compile_options(/DNOMINMAX) - add_definitions(-DWIN64) - set(OS_VAR "windows") - set(OFX_ARCH_NAME "Win64") -endif() - -set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_HEADERS_DIR") -include_directories(${OFX_HEADERS_DIR}) - -add_library(OpenFx INTERFACE) - -add_subdirectory(Support) - -install( - TARGETS OpenFx OfxSupport - EXPORT openfx-export - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) - -install( - EXPORT openfx-export - FILE unofficial-openfxConfig.cmake - NAMESPACE unofficial::OpenFx:: - DESTINATION "share/unofficial-openfx" -) - -file(GLOB OFX_HEADERS "${OFX_HEADERS_DIR}/*.h" "${OFX_SUPPORT_HEADERS_DIR}/*.h") -install(FILES ${OFX_HEADERS} - DESTINATION include/openfx -) - -include(CMakePackageConfigHelpers) - -write_basic_package_version_file( - "${CMAKE_CURRENT_BINARY_DIR}/unofficial-openfxConfigVersion.cmake" - VERSION ${PROJECT_VERSION} - COMPATIBILITY AnyNewerVersion -) -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-openfxConfigVersion.cmake" - DESTINATION "share/unofficial-openfx" -) +cmake_minimum_required(VERSION 3.20) + +project(openfx VERSION 1.4.0 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +if(WIN32) + add_compile_definitions(WINDOWS) + add_compile_options(/DNOMINMAX) + add_definitions(-DWIN64) + set(OS_VAR "windows") + set(OFX_ARCH_NAME "Win64") +endif() + +set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_HEADERS_DIR") +include_directories(${OFX_HEADERS_DIR}) + +add_library(OpenFx INTERFACE) + +add_subdirectory(Support) + +install( + TARGETS OpenFx OfxSupport + EXPORT openfx-export + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT openfx-export + FILE unofficial-openfxConfig.cmake + NAMESPACE unofficial::OpenFx:: + DESTINATION "share/unofficial-openfx" +) + +file(GLOB OFX_HEADERS "${OFX_HEADERS_DIR}/*.h" "${OFX_SUPPORT_HEADERS_DIR}/*.h") +install(FILES ${OFX_HEADERS} + DESTINATION include/openfx +) + +include(CMakePackageConfigHelpers) + +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/unofficial-openfxConfigVersion.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion +) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-openfxConfigVersion.cmake" + DESTINATION "share/unofficial-openfx" +) diff --git a/ports/openfx/usage b/ports/openfx/usage index 1cd881fd3ef2e1..116686febd3afd 100644 --- a/ports/openfx/usage +++ b/ports/openfx/usage @@ -1,5 +1,5 @@ -The package OpenFX provides CMake targets: - - find_package(unofficial-openfx CONFIG REQUIRED) - target_link_libraries(main PRIVATE unofficial::OpenFx::OpenFx) # to use the C-based API - target_link_libraries(main PRIVATE unofficial::OpenFx::OfxSupport) # to use the C++ wrapper +The package OpenFX provides CMake targets: + + find_package(unofficial-openfx CONFIG REQUIRED) + target_link_libraries(main PRIVATE unofficial::OpenFx::OpenFx) # to use the C-based API + target_link_libraries(main PRIVATE unofficial::OpenFx::OfxSupport) # to use the C++ wrapper From eaabc09f717c25728cf4b883d634ef8f94aceef0 Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Mon, 8 Apr 2024 17:04:37 +0330 Subject: [PATCH 08/12] [OpenFX]: add include directory to OpenFx target --- ports/openfx/Openfx.cmake | 6 +++++- ports/openfx/Support.cmake | 1 + versions/o-/openfx.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ports/openfx/Openfx.cmake b/ports/openfx/Openfx.cmake index e44bf164f448c5..91e3ac52a91cf5 100644 --- a/ports/openfx/Openfx.cmake +++ b/ports/openfx/Openfx.cmake @@ -14,9 +14,13 @@ if(WIN32) endif() set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_HEADERS_DIR") -include_directories(${OFX_HEADERS_DIR}) add_library(OpenFx INTERFACE) +target_include_directories(OpenFx + INTERFACE + $ + $ +) add_subdirectory(Support) diff --git a/ports/openfx/Support.cmake b/ports/openfx/Support.cmake index a66b7e2ee34fbb..c507017df37cd8 100644 --- a/ports/openfx/Support.cmake +++ b/ports/openfx/Support.cmake @@ -12,6 +12,7 @@ add_library(OfxSupport STATIC set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_SUPPORT_HEADERS_DIR") target_include_directories(OfxSupport PUBLIC + $ $ $ ) diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index 228c77f593a1ae..0370c06d991770 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a8a5d1f89c088f9a3ff94f47248b9f3a3377559f", + "git-tree": "85b606efc11cbde717c1d467c741dc65e7b1c3f9", "version": "1.4", "port-version": 0 } From 3bf7816839bf0a35cdc04b986d3a8fd426030daf Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Tue, 9 Apr 2024 07:03:52 +0330 Subject: [PATCH 09/12] [OpenFX]: update portfile to load reference from VERSION variable --- ports/openfx/portfile.cmake | 4 +++- versions/o-/openfx.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ports/openfx/portfile.cmake b/ports/openfx/portfile.cmake index 76ec701e759170..baa2e5026afca7 100644 --- a/ports/openfx/portfile.cmake +++ b/ports/openfx/portfile.cmake @@ -1,7 +1,9 @@ +string(REPLACE "." "_" UNDERSCORE_VERSION "${VERSION}") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO AcademySoftwareFoundation/openfx - REF OFX_Release_1_4_TAG + REF "OFX_Release_${UNDERSCORE_VERSION}_TAG" SHA512 b20512ea38823167f191b72f1592548df85fbda6cefe47673972874c139641ee91277e78c1e0d57a457b9f864385e6fa0e4a7edcdbf0c7b2eda956c03a3e1e13 HEAD_REF main ) diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index 0370c06d991770..fc8d88f266d20a 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "85b606efc11cbde717c1d467c741dc65e7b1c3f9", + "git-tree": "dd29a9b3d1f15c47958017297f448e69272d155f", "version": "1.4", "port-version": 0 } From 78c4523b01b86f7ffd2cb451534974b24b69e6ee Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Tue, 9 Apr 2024 07:06:33 +0330 Subject: [PATCH 10/12] [OpenFX]: update method for installing the copyright file --- ports/openfx/portfile.cmake | 2 +- versions/o-/openfx.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/openfx/portfile.cmake b/ports/openfx/portfile.cmake index baa2e5026afca7..3c173606a54f7c 100644 --- a/ports/openfx/portfile.cmake +++ b/ports/openfx/portfile.cmake @@ -20,4 +20,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/DocSrc") configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY) -file(INSTALL "${SOURCE_PATH}/Support/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/openfx" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/Support/LICENSE") diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index fc8d88f266d20a..2ef1f971760c83 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dd29a9b3d1f15c47958017297f448e69272d155f", + "git-tree": "9a4bee144ca978966ec1ae05374affe10393463a", "version": "1.4", "port-version": 0 } From 9d4e56870115e37ccc4e89397ac24aded71dd985 Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Wed, 10 Apr 2024 11:59:00 +0330 Subject: [PATCH 11/12] [OpenFX]: community feedbacks applied to the port https://github.com/microsoft/vcpkg/pull/37670#pullrequestreview-1988110494 --- ports/openfx/Openfx.cmake | 10 ++++------ ports/openfx/usage | 6 ++++-- versions/o-/openfx.json | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/openfx/Openfx.cmake b/ports/openfx/Openfx.cmake index 91e3ac52a91cf5..15c75b0b36b901 100644 --- a/ports/openfx/Openfx.cmake +++ b/ports/openfx/Openfx.cmake @@ -2,18 +2,16 @@ cmake_minimum_required(VERSION 3.20) project(openfx VERSION 1.4.0 LANGUAGES CXX) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) if(WIN32) - add_compile_definitions(WINDOWS) - add_compile_options(/DNOMINMAX) - add_definitions(-DWIN64) + add_compile_definitions(WINDOWS NOMINMAX WIN64) set(OS_VAR "windows") set(OFX_ARCH_NAME "Win64") endif() -set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_HEADERS_DIR") +set(OFX_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) add_library(OpenFx INTERFACE) target_include_directories(OpenFx @@ -34,7 +32,7 @@ install( install( EXPORT openfx-export FILE unofficial-openfxConfig.cmake - NAMESPACE unofficial::OpenFx:: + NAMESPACE unofficial::openfx:: DESTINATION "share/unofficial-openfx" ) diff --git a/ports/openfx/usage b/ports/openfx/usage index 116686febd3afd..98a91281e75518 100644 --- a/ports/openfx/usage +++ b/ports/openfx/usage @@ -1,5 +1,7 @@ The package OpenFX provides CMake targets: find_package(unofficial-openfx CONFIG REQUIRED) - target_link_libraries(main PRIVATE unofficial::OpenFx::OpenFx) # to use the C-based API - target_link_libraries(main PRIVATE unofficial::OpenFx::OfxSupport) # to use the C++ wrapper + # C-based API + target_link_libraries(main PRIVATE unofficial::openfx::OpenFx) + # C++ wrapper + target_link_libraries(main PRIVATE unofficial::openfx::OfxSupport) diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index 2ef1f971760c83..c5622cca7fa686 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "9a4bee144ca978966ec1ae05374affe10393463a", + "git-tree": "7f4524d2ead158837cbf45878c11f88967ee587f", "version": "1.4", "port-version": 0 } From 337baa49835da4f1a755dd150165fd1c9a6fd00b Mon Sep 17 00:00:00 2001 From: Reza Alizadeh Majd Date: Thu, 11 Apr 2024 00:38:03 +0330 Subject: [PATCH 12/12] [OpenFX]: merge support.cmake and Openfx.cmake as CMakeLists.txt --- ports/openfx/{Openfx.cmake => CMakeLists.txt} | 21 +++++++++++++++++- ports/openfx/Support.cmake | 22 ------------------- ports/openfx/portfile.cmake | 3 +-- versions/o-/openfx.json | 2 +- 4 files changed, 22 insertions(+), 26 deletions(-) rename ports/openfx/{Openfx.cmake => CMakeLists.txt} (64%) delete mode 100644 ports/openfx/Support.cmake diff --git a/ports/openfx/Openfx.cmake b/ports/openfx/CMakeLists.txt similarity index 64% rename from ports/openfx/Openfx.cmake rename to ports/openfx/CMakeLists.txt index 15c75b0b36b901..079ff111e3b3db 100644 --- a/ports/openfx/Openfx.cmake +++ b/ports/openfx/CMakeLists.txt @@ -20,7 +20,26 @@ target_include_directories(OpenFx $ ) -add_subdirectory(Support) +set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Support/include) + +add_library(OfxSupport STATIC + Support/Library/ofxsCore.cpp + Support/Library/ofxsImageEffect.cpp + Support/Library/ofxsInteract.cpp + Support/Library/ofxsLog.cpp + Support/Library/ofxsMultiThread.cpp + Support/Library/ofxsParams.cpp + Support/Library/ofxsProperty.cpp + Support/Library/ofxsPropertyValidation.cpp +) +target_include_directories(OfxSupport + PUBLIC + $ + $ + $ +) +target_link_libraries(OfxSupport INTERFACE OpenFx) +target_compile_features(OfxSupport PUBLIC cxx_std_11) install( TARGETS OpenFx OfxSupport diff --git a/ports/openfx/Support.cmake b/ports/openfx/Support.cmake deleted file mode 100644 index c507017df37cd8..00000000000000 --- a/ports/openfx/Support.cmake +++ /dev/null @@ -1,22 +0,0 @@ -add_library(OfxSupport STATIC - Library/ofxsCore.cpp - Library/ofxsImageEffect.cpp - Library/ofxsInteract.cpp - Library/ofxsLog.cpp - Library/ofxsMultiThread.cpp - Library/ofxsParams.cpp - Library/ofxsProperty.cpp - Library/ofxsPropertyValidation.cpp -) - -set(OFX_SUPPORT_HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "OFX_SUPPORT_HEADERS_DIR") -target_include_directories(OfxSupport - PUBLIC - $ - $ - $ -) - -target_link_libraries(OfxSupport INTERFACE OpenFx) - -target_compile_features(OfxSupport PUBLIC cxx_std_11) diff --git a/ports/openfx/portfile.cmake b/ports/openfx/portfile.cmake index 3c173606a54f7c..fb2c2f38119f5b 100644 --- a/ports/openfx/portfile.cmake +++ b/ports/openfx/portfile.cmake @@ -8,8 +8,7 @@ vcpkg_from_github( HEAD_REF main ) -file(COPY_FILE ${CMAKE_CURRENT_LIST_DIR}/Openfx.cmake ${SOURCE_PATH}/CMakeLists.txt) -file(COPY_FILE ${CMAKE_CURRENT_LIST_DIR}/Support.cmake ${SOURCE_PATH}/Support/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}) vcpkg_cmake_install() diff --git a/versions/o-/openfx.json b/versions/o-/openfx.json index c5622cca7fa686..87d2c95a2817cc 100644 --- a/versions/o-/openfx.json +++ b/versions/o-/openfx.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "7f4524d2ead158837cbf45878c11f88967ee587f", + "git-tree": "9bfae0126edf500cbdcb8592715c9bd176b79bfb", "version": "1.4", "port-version": 0 }