зеркало из https://github.com/microsoft/SEAL.git
Thirdparty deps are linked to all targets.
This commit is contained in:
Родитель
8552b3daba
Коммит
9153709597
|
@ -323,8 +323,8 @@ seal_set_language(seal_obj)
|
|||
seal_set_include_directories(seal_obj)
|
||||
|
||||
if(SEAL_USE_MSGSL AND NOT MSVC)
|
||||
target_link_libraries(seal_obj PRIVATE ${GSL})
|
||||
target_include_directories(seal PUBLIC $<BUILD_INTERFACE:${SEAL_MSGSL_INCLUDE_DIR}>)
|
||||
target_link_libraries(seal_obj PUBLIC ${GSL})
|
||||
# target_include_directories(seal_obj PUBLIC $<BUILD_INTERFACE:${SEAL_MSGSL_INCLUDE_DIRS}>)
|
||||
endif()
|
||||
|
||||
if(SEAL_USE_ZLIB AND NOT MSVC)
|
||||
|
@ -333,7 +333,7 @@ endif()
|
|||
|
||||
if(SEAL_USE_ZSTD AND NOT MSVC)
|
||||
target_link_libraries(seal_obj PRIVATE ${ZSTD})
|
||||
target_include_directories(seal_obj PRIVATE $<BUILD_INTERFACE:${SEAL_ZSTD_INCLUDE_DIR}>)
|
||||
target_include_directories(seal_obj PRIVATE $<BUILD_INTERFACE:${SEAL_ZSTD_INCLUDE_DIRS}>)
|
||||
endif()
|
||||
|
||||
# Always build the static library
|
||||
|
@ -383,7 +383,7 @@ if(SEAL_BUILD_SEAL_C)
|
|||
seal_set_language(sealc)
|
||||
seal_set_include_directories(sealc)
|
||||
|
||||
target_link_libraries(sealc PUBLIC seal)
|
||||
target_link_libraries(sealc PUBLIC seal ${GSL} ${ZLIB} ${ZSTD})
|
||||
|
||||
seal_install_target(sealc SEALTargets)
|
||||
endif()
|
||||
|
@ -442,7 +442,7 @@ option(SEAL_BUILD_EXAMPLES ${SEAL_BUILD_EXAMPLES_OPTION_STR} OFF)
|
|||
if(SEAL_BUILD_EXAMPLES)
|
||||
add_executable(sealexamples)
|
||||
add_subdirectory(native/examples)
|
||||
target_link_libraries(sealexamples PRIVATE seal)
|
||||
target_link_libraries(sealexamples PRIVATE seal ${GSL} ${ZLIB} ${ZSTD})
|
||||
endif()
|
||||
|
||||
##################
|
||||
|
@ -456,7 +456,7 @@ option(SEAL_BUILD_TESTS ${SEAL_BUILD_TESTS_OPTION_STR} OFF)
|
|||
if(SEAL_BUILD_TESTS)
|
||||
add_executable(sealtest)
|
||||
add_subdirectory(native/tests/seal)
|
||||
target_link_libraries(sealtest PRIVATE seal gtest)
|
||||
target_link_libraries(sealtest PRIVATE seal ${GSL} ${ZLIB} ${ZSTD} ${GTEST})
|
||||
endif()
|
||||
|
||||
#######################################
|
||||
|
|
|
@ -16,4 +16,5 @@ mark_as_advanced(FETCHCONTENT_SOURCE_DIR_MSGSL)
|
|||
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_MSGSL)
|
||||
add_subdirectory(
|
||||
${msgsl_SOURCE_DIR}
|
||||
EXCLUDE_FROM_ALL)
|
||||
EXCLUDE_FROM_ALL)
|
||||
set(SEAL_MSGSL_INCLUDE_DIRS "${msgsl_SOURCE_DIR}/include")
|
|
@ -33,6 +33,6 @@ add_subdirectory(
|
|||
# ZLIB creates a file zconf.h into it, which must be visible to the compiler.
|
||||
set(SEAL_ZLIB_INCLUDE_DIRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/thirdparty/zlib-src
|
||||
${zlib_SOURCE_DIR})
|
||||
${zlib_SOURCE_DIRS})
|
||||
set_target_properties(zlibstatic PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SEAL_ZLIB_INCLUDE_DIRS}")
|
|
@ -26,6 +26,4 @@ mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_ZSTD)
|
|||
add_subdirectory(
|
||||
${zstd_SOURCE_DIR}/build/cmake
|
||||
EXCLUDE_FROM_ALL)
|
||||
set(SEAL_ZSTD_INCLUDE_DIRS
|
||||
${zstd_SOURCE_DIR}/lib
|
||||
${zstd_SOURCE_DIR}/lib/common)
|
||||
set(SEAL_ZSTD_INCLUDE_DIRS "${zstd_SOURCE_DIR}/lib")
|
|
@ -434,8 +434,9 @@ namespace seal
|
|||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wsign-conversion"
|
||||
#endif
|
||||
#include "common/zstd_internal.h"
|
||||
#define ZSTD_STATIC_LINKING_ONLY
|
||||
#include "zstd.h"
|
||||
#include "common/zstd_errors.h"
|
||||
#if (SEAL_COMPILER == SEAL_COMPILER_GCC)
|
||||
#pragma GCC diagnostic pop
|
||||
#elif (SEAL_COMPILER == SEAL_COMPILER_CLANG)
|
||||
|
|
Загрузка…
Ссылка в новой задаче