Skip to content

Commit

Permalink
Simplify package signing for Emgu TF.
Browse files Browse the repository at this point in the history
  • Loading branch information
emgucv committed Sep 5, 2024
1 parent b9b4532 commit 2691352
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 77 deletions.
159 changes: 94 additions & 65 deletions CMakeLists.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Emgu.TF.Runtime/Maui/UI/Full/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# --------------------------------------------------------

IF(HAVE_ANDROID AND HAVE_WINDESKTOP)
PROJECT(Emgu.TF.Platform.Maui.UI)
PROJECT(Emgu.TF.runtime.maui)
INSTALL(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DESTINATION Emgu.TF.Platform/Maui/UI
DESTINATION Emgu.TF.Runtime/Maui/UI
COMPONENT emgutf_source
FILES_MATCHING
PATTERN "*.cs"
Expand Down
5 changes: 4 additions & 1 deletion cmake/Emgu.TF.Directory.Build.props.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ http://www.emgu.com/wiki/files/emgutf/${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PAC

<!-- https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022 -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
${EMGUTF_POST_PROCESS_BINARY}

<Import Project="SignBinary.Targets" Condition="exists('SignBinary.Targets')" />
<Import Project="SignPkg.Targets" Condition="exists('SignPkg.Targets')" />

</Project>
6 changes: 4 additions & 2 deletions cmake/Emgu.TF.Models.Directory.Build.props.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Project>
<PropertyGroup>
<EmguTFProjectRoot>$([System.IO.Path]::GetFullPath(${EMGU_TF_SOURCE_DIR}))</EmguTFProjectRoot>
<EmguTFProjectRoot>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\))</EmguTFProjectRoot>
<TfBinaryDir>$([System.IO.Path]::GetFullPath($(EmguTFProjectRoot)\lib))</TfBinaryDir>
<PackageId>${EMGUTF_MODEL_NUGET_ID}</PackageId>
<title>${EMGUTF_MODEL_NUGET_TITLE}</title>
Expand Down Expand Up @@ -46,5 +46,7 @@ http://www.emgu.com/wiki/files/emgutf/${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PAC

<!-- https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022 -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
${EMGUTF_POST_PROCESS_BINARY}

<Import Project="SignBinary.Targets" Condition="exists('SignBinary.Targets')" />
<Import Project="SignPkg.Targets" Condition="exists('SignPkg.Targets')" />
</Project>
5 changes: 4 additions & 1 deletion cmake/Emgu.TF.Protobuf.Directory.Build.props.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ http://www.emgu.com/wiki/files/emgutf/${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PAC

<!-- https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022 -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
${EMGUTF_PROTOBUF_POST_PROCESS_BINARY}

<Import Project="SignBinary.Targets" Condition="exists('SignBinary.Targets')" />
<Import Project="SignPkg.Targets" Condition="exists('SignPkg.Targets')" />
<!-- ${EMGUTF_PROTOBUF_POST_PROCESS_BINARY} -->
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
<!-- https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022 -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<EmguTFProjectRoot>$([System.IO.Path]::GetFullPath(${EMGU_TF_SOURCE_DIR}))</EmguTFProjectRoot>
<EmguTFProjectRoot>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\..\..\..\))</EmguTFProjectRoot>
<TfBinaryDir>$([System.IO.Path]::GetFullPath($(EmguTFProjectRoot)\lib))</TfBinaryDir>
</PropertyGroup>
${EMGUTF_MAUI_POST_PROCESS_BINARY}
<!-- ${EMGUTF_MAUI_POST_PROCESS_BINARY} -->

<Import Project="SignBinary.Targets" Condition="exists('SignBinary.Targets')" />
<Import Project="SignPkg.Targets" Condition="exists('SignPkg.Targets')" />
</Project>
5 changes: 5 additions & 0 deletions cmake/Emgu.TF.runtime.maui.android.Directory.Build.props.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ ${NUGET_EMGU_URL}/wiki/files/emgutf/${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKA
<PackagePath>docs\</PackagePath>
</None>
</ItemGroup>

<Import Project="SignBinary.Targets" Condition="exists('SignBinary.Targets')" />
<Import Project="SignPkg.Targets" Condition="exists('SignPkg.Targets')" />
<!--
${EMGUTF_MAUI_ANDROID_POST_PROCESS_BINARY}
${EMGUTF_MAUI_ANDROID_POST_PROCESS_NUGET}
-->
</Project>
10 changes: 6 additions & 4 deletions platforms/nuget/Emgu.TF.runtime.maui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IF(HAVE_MAUI)
BUILD_NUGET_PACKAGE(
${PROJECT_NAME}
#"${CMAKE_CURRENT_SOURCE_DIR}/../../../Emgu.TF/Emgu.TF.Netstandard/Emgu.TF.Netstandard.csproj" #csproj_file
"${CMAKE_CURRENT_SOURCE_DIR}/../../../Emgu.TF.Platform/Maui/UI/Full/Emgu.TF.Platform.Maui.UI.csproj" #csproj_file
"${CMAKE_CURRENT_SOURCE_DIR}/../../../Emgu.TF.Runtime/Maui/UI/Full/Emgu.TF.runtime.maui.csproj" #csproj_file
"${CMAKE_CURRENT_SOURCE_DIR}/Package.nuspec" #nuspec_file
"${NUGET_OUTPUT_DIR}" #output_dir
"${CMAKE_CURRENT_SOURCE_DIR}" #working_dir
Expand All @@ -25,11 +25,13 @@ IF(HAVE_MAUI)
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "NUGET")
endif()

IF (TARGET Emgu.TF.Platform.Maui.Android)
ADD_DEPENDENCIES(${PROJECT_NAME} Emgu.TF.Platform.Maui.Android)
IF (TARGET Emgu.TF.runtime.maui.android)
ADD_DEPENDENCIES(${PROJECT_NAME} Emgu.TF.runtime.maui.android)
ENDIF()

ADD_DEPENDENCIES(${PROJECT_NAME} Emgu.TF.Platform.Maui.UI)
IF (TARGET Emgu.TF.runtime.maui)
ADD_DEPENDENCIES(${PROJECT_NAME} Emgu.TF.runtime.maui)
ENDIF()

ADD_DEPENDENCIES(${PROJECT_NAME} Emgu.TF)

Expand Down

0 comments on commit 2691352

Please sign in to comment.