From 9c7f5e941ee14192e4a878b09595ecea23dcdfb8 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Fri, 5 Jun 2020 01:08:20 +0600 Subject: [PATCH] Fix compilation on NetBSD --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 244ef6329c..b24a76e0be 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -370,6 +370,10 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) endif() + + if(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ljemalloc") + endif() if( NOT NO_STRIP ) set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -s" )