Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SEAL_PURE_SOURCETREE option #427

Merged
merged 4 commits into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# Source Tree
set(SEAL_INCLUDES_DIR ${CMAKE_CURRENT_LIST_DIR}/native/src)
set(SEAL_THIRDPARTY_DIR ${CMAKE_CURRENT_LIST_DIR}/thirdparty)
set(SEAL_CONFIG_IN_FILENAME ${CMAKE_CURRENT_LIST_DIR}/cmake/SEALConfig.cmake.in)
set(SEAL_CONFIG_H_IN_FILENAME ${SEAL_INCLUDES_DIR}/seal/util/config.h.in)

Expand All @@ -102,6 +101,7 @@ set(SEAL_TARGETS_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/cmake/SEALTargets.cmake)
set(SEAL_CONFIG_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/cmake/SEALConfig.cmake)
set(SEAL_CONFIG_VERSION_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/cmake/SEALConfigVersion.cmake)
set(SEAL_CONFIG_H_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/native/src/seal/util/config.h)
set(SEAL_THIRDPARTY_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty)

# Install
set(SEAL_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/SEAL-${SEAL_VERSION_MAJOR}.${SEAL_VERSION_MINOR})
Expand Down Expand Up @@ -719,15 +719,15 @@ endif()
# Create SEALNet.csproj, SEALNetExamples.csproj, and SEALNetTest.csproj
configure_file(
${CMAKE_CURRENT_LIST_DIR}/dotnet/src/SEALNet.csproj.in
${CMAKE_CURRENT_LIST_DIR}/dotnet/src/SEALNet.csproj
${CMAKE_CURRENT_BINARY_DIR}/dotnet/src/SEALNet.csproj
@ONLY)
configure_file(
${CMAKE_CURRENT_LIST_DIR}/dotnet/tests/SEALNetTest.csproj.in
${CMAKE_CURRENT_LIST_DIR}/dotnet/tests/SEALNetTest.csproj
${CMAKE_CURRENT_BINARY_DIR}/dotnet/tests/SEALNetTest.csproj
@ONLY)
configure_file(
${CMAKE_CURRENT_LIST_DIR}/dotnet/examples/SEALNetExamples.csproj.in
${CMAKE_CURRENT_LIST_DIR}/dotnet/examples/SEALNetExamples.csproj
${CMAKE_CURRENT_BINARY_DIR}/dotnet/examples/SEALNetExamples.csproj
@ONLY)

# Set the sealc dynamic library file names to be included in creating
Expand All @@ -738,7 +738,7 @@ configure_file(
# Create SEALNet-multi.nuspec for a multi-platform NuGet package
configure_file(
${CMAKE_CURRENT_LIST_DIR}/dotnet/nuget/SEALNet-multi.nuspec.in
${CMAKE_CURRENT_LIST_DIR}/dotnet/nuget/SEALNet-multi.nuspec
${CMAKE_CURRENT_BINARY_DIR}/dotnet/nuget/SEALNet-multi.nuspec
@ONLY)

set(NUGET_WINDOWS_SEAL_C_PATH "")
Expand All @@ -757,5 +757,5 @@ endif()
# Create SEALNet.nuspec for a local NuGet pack from SEALNet.nuspec.in
configure_file(
${CMAKE_CURRENT_LIST_DIR}/dotnet/nuget/SEALNet.nuspec.in
${CMAKE_CURRENT_LIST_DIR}/dotnet/nuget/SEALNet.nuspec
${CMAKE_CURRENT_BINARY_DIR}/dotnet/nuget/SEALNet.nuspec
@ONLY)
1 change: 1 addition & 0 deletions cmake/ExternalIntelHEXL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if(NOT hexl_POPULATED)

add_subdirectory(
${hexl_SOURCE_DIR}
${hexl_SOURCE_DIR}/../hexl-build
EXCLUDE_FROM_ALL
)
endif()
1 change: 1 addition & 0 deletions cmake/ExternalMSGSL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ if(NOT msgsl_POPULATED)

add_subdirectory(
${msgsl_SOURCE_DIR}
${msgsl_SOURCE_DIR}/../msgsl-build
EXCLUDE_FROM_ALL)
endif()
1 change: 1 addition & 0 deletions cmake/ExternalZLIB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ if(NOT zlib_POPULATED)
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS TRUE CACHE INTERNAL "Suppress CMP0048 warning" FORCE)
add_subdirectory(
${zlib_SOURCE_DIR}
${zlib_SOURCE_DIR}/../zlib-build
EXCLUDE_FROM_ALL)
endif()
1 change: 1 addition & 0 deletions cmake/ExternalZSTD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ if(NOT zstd_POPULATED)

add_subdirectory(
${zstd_SOURCE_DIR}/build/cmake
${zstd_SOURCE_DIR}/../zstd-build
EXCLUDE_FROM_ALL)
endif()
5 changes: 4 additions & 1 deletion dotnet/examples/SEALNetExamples.csproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@

<ItemGroup>
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="@SEAL_WINDOWS_SEAL_C_DIRECTORY@\sealc.dll" />
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc.so.*" />
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc.so*" />
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(OSX))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc*.dylib" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Copy SourceFiles="@(SEALCBinaryFiles)" DestinationFolder="$(TargetDir)" />
</Target>

<ItemGroup>
<Compile Include="@CMAKE_CURRENT_SOURCE_DIR@\dotnet\examples\**\*.cs" />
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions dotnet/src/SEALNet.csproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Include="@CMAKE_CURRENT_SOURCE_DIR@\dotnet\src\**\*.cs" />
</ItemGroup>
</Project>
5 changes: 4 additions & 1 deletion dotnet/tests/SEALNetTest.csproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@

<ItemGroup>
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Windows))" Include="@SEAL_WINDOWS_SEAL_C_DIRECTORY@\sealc.dll" />
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc.so.*" />
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(Linux))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc.so*" />
<SEALCBinaryFiles Condition="$([MSBuild]::IsOsPlatform(OSX))" Include="@CMAKE_LIBRARY_OUTPUT_DIRECTORY@/libsealc*.dylib" />
</ItemGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Copy SourceFiles="@(SEALCBinaryFiles)" DestinationFolder="$(TargetDir)" />
</Target>

<ItemGroup>
<Compile Include="@CMAKE_CURRENT_SOURCE_DIR@\dotnet\tests\**\*.cs" />
</ItemGroup>
</Project>