From 408b76d103dc860d6ace23c93c2eace35f90421b Mon Sep 17 00:00:00 2001 From: Jan Christoph Uhde Date: Thu, 27 Jun 2019 12:43:27 +0200 Subject: [PATCH] make includes available for projects that add mimalloc as subdirectory --- CMakeLists.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 095fc2c7..1cc24573 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,10 @@ if(MI_OVERRIDE MATCHES "ON") target_compile_definitions(mimalloc PRIVATE MI_MALLOC_OVERRIDE) endif() target_compile_options(mimalloc PRIVATE ${mi_cflags}) -target_include_directories(mimalloc PRIVATE include PUBLIC $) +target_include_directories(mimalloc PUBLIC + $ + $ +) target_link_libraries(mimalloc PUBLIC ${mi_libraries}) # static library @@ -134,7 +137,11 @@ if(NOT WIN32 AND MI_OVERRIDE MATCHES "ON") target_compile_definitions(mimalloc-static PRIVATE MI_MALLOC_OVERRIDE) endif() target_compile_options(mimalloc-static PRIVATE ${mi_cflags}) -target_include_directories(mimalloc-static PRIVATE include PUBLIC $) + +target_include_directories(mimalloc-static PUBLIC + $ + $ +) target_link_libraries(mimalloc-static PUBLIC ${mi_libraries}) # install static and shared library, and the include files @@ -154,7 +161,10 @@ if(NOT WIN32 AND MI_OVERRIDE MATCHES "ON") target_compile_definitions(mimalloc-obj PRIVATE MI_MALLOC_OVERRIDE) endif() target_compile_options(mimalloc-obj PRIVATE ${mi_cflags}) -target_include_directories(mimalloc-obj PRIVATE include PUBLIC $) +target_include_directories(mimalloc-obj PUBLIC + $ + $ +) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION} DESTINATION ${mi_install_dir}