use INTERFACE for interface target

This commit is contained in:
Markus Pilman 2021-02-04 11:22:45 -07:00
parent 0207f89904
commit f4370adfcb
1 changed files with 2 additions and 2 deletions

View File

@ -14,8 +14,8 @@ if(NOT WIN32)
if(JEMALLOC_INCLUDE_DIR AND JEMALLOC AND JEMALLOC_PIC)
set_target_properties(im_jemalloc_pic PROPERTIES IMPORTED_LOCATION "${JEMALLOC_PIC}")
set_target_properties(im_jemalloc PROPERTIES IMPORTED_LOCATION "${JEMALLOC}")
target_include_directories(jemalloc PUBLIC "${JEMALLOC_INCLUDE_DIR}")
target_link_libraries(jemalloc PUBLIC im_jemalloc im_jemalloc_pic)
target_include_directories(jemalloc INTERFACE "${JEMALLOC_INCLUDE_DIR}")
target_link_libraries(jemalloc INTERFACE im_jemalloc im_jemalloc_pic)
else()
include(ExternalProject)
set(JEMALLOC_DIR "${CMAKE_BINARY_DIR}/jemalloc")