fix cmake issues with OBJECT install
This commit is contained in:
parent
76023ca45f
commit
cf8815854c
@ -162,7 +162,8 @@ target_include_directories(mimalloc-obj PUBLIC
|
||||
$<INSTALL_INTERFACE:${mi_install_dir}/include>
|
||||
)
|
||||
|
||||
install(TARGETS mimalloc-obj EXPORT mimalloc DESTINATION ${mi_install_dir})
|
||||
# seems to lead to cmake warnings/errors on some systems, disable for now :-(
|
||||
# install(TARGETS mimalloc-obj EXPORT mimalloc DESTINATION ${mi_install_dir})
|
||||
|
||||
install(FILES $<TARGET_OBJECTS:mimalloc-obj>
|
||||
DESTINATION ${mi_install_dir}
|
||||
|
@ -1 +1,2 @@
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/mimalloc.cmake)
|
||||
get_filename_component(MIMALLOC_TARGET_DIR "${CMAKE_CURRENT_LIST_DIR}" PATH)
|
||||
|
@ -31,7 +31,7 @@ target_link_libraries(static-override PUBLIC mimalloc-static)
|
||||
add_executable(static-override-cxx main-override.cpp)
|
||||
target_link_libraries(static-override-cxx PUBLIC mimalloc-static)
|
||||
|
||||
# and with a static object file; need to link with pthread explicitly :-(
|
||||
add_executable(static-override-obj main-override.c $<TARGET_OBJECTS:mimalloc-obj>)
|
||||
target_include_directories(static-override-obj PUBLIC $<TARGET_PROPERTY:mimalloc-obj,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
# and with a static object file
|
||||
add_executable(static-override-obj main-override.c ${MIMALLOC_TARGET_DIR}/mimalloc.o)
|
||||
target_include_directories(static-override-obj PUBLIC ${MIMALLOC_TARGET_DIR}/include)
|
||||
target_link_libraries(static-override-obj PUBLIC pthread)
|
||||
|
Loading…
Reference in New Issue
Block a user