@@ -84,6 +84,10 @@ endif()
84
84
# Required files and directories
85
85
include (GNUInstallDirs)
86
86
87
+ # Runtime path setup
88
+ set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_LIBDIR} " )
89
+ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )
90
+
87
91
# Source Tree
88
92
set (SEAL_INCLUDES_DIR ${CMAKE_CURRENT_LIST_DIR} /native/src)
89
93
set (SEAL_THIRDPARTY_DIR ${CMAKE_CURRENT_LIST_DIR} /thirdparty)
@@ -219,9 +223,9 @@ if(SEAL_USE_INTEL_HEXL)
219
223
message (STATUS "Intel HEXL: download ..." )
220
224
seal_fetch_thirdparty_content(ExternalIntelHEXL)
221
225
else ()
222
- find_package (HEXL 1.1.0 )
226
+ find_package (HEXL 1.2.1 )
223
227
if (NOT TARGET HEXL::hexl)
224
- FATAL_ERROR( "Intel HEXL: not found" )
228
+ message (FATAL_ERROR "Intel HEXL: not found" )
225
229
endif ()
226
230
endif ()
227
231
endif ()
@@ -412,15 +416,13 @@ if(NOT BUILD_SHARED_LIBS)
412
416
if (SEAL_USE_INTEL_HEXL)
413
417
if (SEAL_BUILD_DEPS)
414
418
add_dependencies (seal HEXL::hexl)
415
- target_include_directories (seal PUBLIC $<BUILD_INTERFACE:${hexl_SOURCE_DIR} /hexl/include >)
419
+ target_include_directories (seal PUBLIC
420
+ $<BUILD_INTERFACE:$<TARGET_PROPERTY:HEXL::hexl,INTERFACE_INCLUDE_DIRECTORIES >>)
416
421
seal_combine_archives(seal HEXL::hexl)
422
+ target_compile_options (seal PUBLIC $<TARGET_PROPERTY:HEXL::hexl,INTERFACE_COMPILE_OPTIONS>)
423
+ target_link_options (seal PUBLIC $<TARGET_PROPERTY:HEXL::hexl,INTERFACE_LINK_OPTIONS>)
417
424
else ()
418
- target_link_libraries (seal PRIVATE HEXL::hexl)
419
- get_target_property (
420
- HEXL_INCLUDE_DIR
421
- HEXL::hexl
422
- INTERFACE_INCLUDE_DIRECTORIES )
423
- target_include_directories (seal PUBLIC ${HEXL_INCLUDE_DIR} )
425
+ target_link_libraries (seal PUBLIC HEXL::hexl)
424
426
endif ()
425
427
endif ()
426
428
@@ -461,12 +463,12 @@ else()
461
463
endif ()
462
464
463
465
if (SEAL_USE_INTEL_HEXL)
464
- get_target_property (
465
- HEXL_INCLUDE_DIR
466
- HEXL::hexl
467
- INTERFACE_INCLUDE_DIRECTORIES )
468
- target_include_directories (seal_shared PUBLIC ${HEXL_INCLUDE_DIR} )
469
- target_link_libraries (seal_shared PRIVATE HEXL::hexl )
466
+ target_link_libraries (seal_shared PUBLIC HEXL::hexl)
467
+ # Install shared HEXL library to installation directory
468
+ install ( DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
469
+ DESTINATION ${CMAKE_INSTALL_PREFIX} / ${CMAKE_LIBRARY_PREFIX}
470
+ FILES_MATCHING PATTERN "*hexl*"
471
+ )
470
472
endif ()
471
473
endif ()
472
474
0 commit comments