$NetBSD$

--- plugins/DebuggerCore/CMakeLists.txt.orig	2017-02-18 21:21:09.000000000 +0000
+++ plugins/DebuggerCore/CMakeLists.txt
@@ -9,7 +9,7 @@ include("${PROJECT_SOURCE_DIR}/cmake/Ena
 set(PluginName "DebuggerCore")
 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD")
 
 set(UI_FILES
 	unix/linux/DialogMemoryAccess.ui
@@ -76,6 +76,36 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux"
 	)
 endif()
 
+if(${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD")
+
+	include_directories(
+		"unix/netbsd"
+	)
+
+	set(DebuggerCore_SRCS
+		${DebuggerCore_SRCS}
+		unix/netbsd/DebuggerCore.cpp
+		unix/netbsd/DebuggerCore.h
+		unix/netbsd/PlatformCommon.cpp
+		unix/netbsd/PlatformCommon.h
+		unix/netbsd/PlatformEvent.cpp
+		unix/netbsd/PlatformEvent.h
+		unix/netbsd/PlatformProcess.cpp
+		unix/netbsd/PlatformProcess.h
+		unix/netbsd/PlatformRegion.cpp
+		unix/netbsd/PlatformRegion.h
+		unix/netbsd/PlatformState.cpp
+		unix/netbsd/PlatformState.h
+		unix/netbsd/PlatformThread.cpp
+		unix/netbsd/PlatformThread.h	
+		unix/netbsd/FeatureDetect.cpp
+		unix/netbsd/FeatureDetect.h
+		unix/netbsd/DialogMemoryAccess.cpp
+		unix/netbsd/DialogMemoryAccess.h
+		${UI_H}
+	)
+endif()
+
 add_library(${PluginName} SHARED ${DebuggerCore_SRCS} )
 
 if(Qt5Core_FOUND)
