Fix build on Linux with Ninja generator
This commit is contained in:
parent
6602ed1ea0
commit
2661c92394
1 changed files with 7 additions and 8 deletions
15
external/jemalloc/CMakeLists.txt
vendored
15
external/jemalloc/CMakeLists.txt
vendored
|
|
@ -18,27 +18,26 @@ endif()
|
|||
|
||||
if (NOT JEMALLOC_FOUND)
|
||||
add_library(external_jemalloc_bundled STATIC IMPORTED GLOBAL)
|
||||
set(jemalloc_loc ${third_party_loc}/jemalloc)
|
||||
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(jemalloc
|
||||
SOURCE_DIR ${third_party_loc}/jemalloc
|
||||
CONFIGURE_COMMAND cd "${third_party_loc}/jemalloc" && ./autogen.sh
|
||||
SOURCE_DIR ${jemalloc_loc}
|
||||
CONFIGURE_COMMAND cd "${jemalloc_loc}" && ./autogen.sh
|
||||
INSTALL_COMMAND :
|
||||
BUILD_IN_SOURCE 1
|
||||
BUILD_BYPRODUCTS ${jemalloc_loc}/lib/libjemalloc.a
|
||||
)
|
||||
|
||||
ExternalProject_Get_property(jemalloc SOURCE_DIR)
|
||||
ExternalProject_Get_property(jemalloc BINARY_DIR)
|
||||
|
||||
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
|
||||
file(MAKE_DIRECTORY "${jemalloc_loc}/include")
|
||||
|
||||
set_target_properties(external_jemalloc_bundled PROPERTIES
|
||||
IMPORTED_LOCATION "${BINARY_DIR}/lib/libjemalloc.a"
|
||||
IMPORTED_LOCATION "${jemalloc_loc}/lib/libjemalloc.a"
|
||||
)
|
||||
|
||||
target_include_directories(external_jemalloc_bundled SYSTEM
|
||||
INTERFACE
|
||||
${SOURCE_DIR}/include
|
||||
${jemalloc_loc}/include
|
||||
)
|
||||
|
||||
target_link_libraries(external_jemalloc_bundled
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue