Commit 64d13b27 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Fix a few install export issues with KWSYS.

These local patches are soon to be replaced with upstream fixes
parent 040a0993
......@@ -4,5 +4,7 @@ set(KWSYS_USE_RegularExpression ON)
set(KWSYS_USE_SystemTools ON)
set(KWSYS_BUILD_SHARED ${ADIOS2_BUILD_SHARED_LIBS})
set(KWSYS_SPLIT_OBJECTS_FROM_INTERFACE ON)
set(KWSYS_INSTALL_EXPORT_NAME adios2Exports)
set(KWSYS_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR})
add_subdirectory(adios2sys EXCLUDE_FROM_ALL)
add_subdirectory(adios2sys)
......@@ -886,12 +886,16 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
# Set up include usage requirement
IF(COMMAND TARGET_INCLUDE_DIRECTORIES)
TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_INTERFACE} INTERFACE
${CMAKE_CURRENT_BINARY_DIR})
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
IF(KWSYS_INSTALL_INCLUDE_DIR)
TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_INTERFACE} INTERFACE
$<INSTALL_INTERFACE:${KWSYS_INSTALL_INCLUDE_DIR}>)
ENDIF()
ENDIF()
# Create an install target for the library.
IF(KWSYS_INSTALL_LIBRARY_RULE)
INSTALL(TARGETS ${KWSYS_TARGET_INTERFACE} ${KWSYS_INSTALL_LIBRARY_RULE})
INSTALL(TARGETS ${KWSYS_TARGET_LINK} ${KWSYS_TARGET_INTERFACE} ${KWSYS_INSTALL_LIBRARY_RULE})
ENDIF()
ENDIF()
......@@ -930,6 +934,16 @@ IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
${KWSYS_PROPERTIES_C})
ENDIF()
# Set up include usage requirement
IF(COMMAND TARGET_INCLUDE_DIRECTORIES)
TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_C_INTERFACE} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
IF(KWSYS_INSTALL_INCLUDE_DIR)
TARGET_INCLUDE_DIRECTORIES(${KWSYS_TARGET_C_INTERFACE} INTERFACE
$<INSTALL_INTERFACE:${KWSYS_INSTALL_INCLUDE_DIR}>)
ENDIF()
ENDIF()
# Create an install target for the library.
IF(KWSYS_INSTALL_LIBRARY_RULE)
INSTALL(TARGETS ${KWSYS_TARGET_C_INTERFACE} ${KWSYS_INSTALL_LIBRARY_RULE})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment