diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c7e1c4..ef35300 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,24 +21,7 @@
 
 cmake_minimum_required(VERSION 2.8.6)
 
-project(DSView)
-
-#===============================================================================
-#= Config Header
-#-------------------------------------------------------------------------------
-
-set(DS_TITLE DSView)
-set(DS_DESCRIPTION "A GUI for instruments of DreamSourceLab")
-
-set(DS_VERSION_MAJOR 1)
-set(DS_VERSION_MINOR 2)
-set(DS_VERSION_MICRO 2)
-set(DS_VERSION_STRING  ${DS_VERSION_MAJOR}.${DS_VERSION_MINOR}.${DS_VERSION_MICRO} )
-
-configure_file (
-	${PROJECT_SOURCE_DIR}/DSView/config.h.in
-	${PROJECT_BINARY_DIR}/DSView/config.h
-)
+project(sigrok4DSL)
 
 #===============================================================================
 #=pkg config
@@ -83,7 +66,6 @@ endif()
 #= first search path
 #-------------------------------------------------------------------------------
 include_directories(
-   ./DSView
    ./libsigrok4DSL
    ./libsigrokdecode4DSL
    ./common
@@ -95,55 +77,15 @@ include_directories(
 pkg_search_module(GLIB glib-2.0)
 
 if(NOT GLIB_FOUND)
-	message(FATAL_ERROR  "Please install glib!")
+       message(FATAL_ERROR  "Please install glib!")
 endif()
 
 message("----- glib-2.0:")
-message(STATUS "	 includes:" ${GLIB_INCLUDE_DIRS})
-message(STATUS "	 libraries:" ${GLIB_LIBDIR}/libglib-2.0.*)
+message(STATUS "        includes:" ${GLIB_INCLUDE_DIRS})
+message(STATUS "        libraries:" ${GLIB_LIBDIR}/libglib-2.0.*)
 include_directories(${GLIB_INCLUDE_DIRS})
 link_directories(${GLIB_LIBDIR})
 
-#===============================================================================
-#= python3
-#-------------------------------------------------------------------------------
-
-find_package(Python3 COMPONENTS Development QUIET)
-
-if (Python3_FOUND)
-	message("----- python3:")
-	message(STATUS "	 includes:" ${Python3_INCLUDE_DIRS})
-	message(STATUS "	 libraries:" ${Python3_LIBRARIES})
-	include_directories(${Python3_INCLUDE_DIRS})
-	set(PY_LIB ${Python3_LIBRARIES})
-else()
-     find_package(PythonLibs 3 QUIET)
-
-     if(PYTHONLIBS_FOUND)
-     	message("----- python(${PYTHONLIBS_VERSION_STRING}):")
-	message(STATUS "	 includes:" ${PYTHON_INCLUDE_DIRS})
-	message(STATUS "	 libraries:" ${PYTHON_LIBRARIES})
-	include_directories(${PYTHON_INCLUDE_DIRS})
-	set(PY_LIB ${PYTHON_LIBRARIES})
-     else()
-     	message(FATAL_ERROR  "Please install lib python3!")
-     endif()
-endif()
-  
-#===============================================================================
-#= FFTW
-#-------------------------------------------------------------------------------
-find_package(FFTW)
-
-if(NOT FFTW_FOUND)
-	message(FATAL_ERROR  "Please install lib fftw!")
-endif()
-
-message("----- FFTW:")
-message(STATUS "	 includes:" ${FFTW_INCLUDE_DIRS})
-message(STATUS "	 libraries:" ${FFTW_LIBRARIES})
-include_directories(${FFTW_INCLUDE_DIRS})
-
 #===============================================================================
 #= libusb-1.0
 #-------------------------------------------------------------------------------
@@ -158,72 +100,6 @@ message(STATUS "	 includes:" ${LIBUSB_1_INCLUDE_DIRS})
 message(STATUS "	 libraries:" ${LIBUSB_1_LIBRARIES})
 include_directories(${LIBUSB_1_INCLUDE_DIRS})
 
-#===============================================================================
-#= zlib
-#-------------------------------------------------------------------------------
-find_package(ZLIB QUIET)
-
-if(NOT ZLIB_FOUND)
-	message(FATAL_ERROR  "Please install zlib!")
-endif()
-
-message("----- zlib:")
-message(STATUS "	 includes:" ${ZLIB_INCLUDE_DIRS})
-message(STATUS "	 libraries:" ${ZLIB_LIBRARIES})
-include_directories(${ZLIB_INCLUDE_DIRS})
-
-#===============================================================================
-#= Qt5 or Qt6
-#-------------------------------------------------------------------------------
-
-find_package(Qt5Core QUIET)
-
-if(Qt5Core_FOUND)
-	message("----- Qt5:")
-	message(STATUS "	 includes:" ${Qt5Core_INCLUDE_DIRS})
-	find_package(Qt5Widgets REQUIRED)
-	find_package(Qt5Gui REQUIRED)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
-	set(QT_INCLUDE_DIRS ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
-	set(QT_LIBRARIES Qt5::Gui Qt5::Widgets)
-	add_definitions(${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS})
-else()
-	find_package(Qt6Core QUIET)
-endif()
-
-if(Qt6Core_FOUND)
-    	message("----- Qt6:")
-	message(STATUS "	 includes:" ${Qt6Core_INCLUDE_DIRS})
-	find_package(Qt6Widgets REQUIRED)
-	find_package(Qt6Gui REQUIRED)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt6Widgets_EXECUTABLE_COMPILE_FLAGS}")
-	set(QT_INCLUDE_DIRS ${Qt6Gui_INCLUDE_DIRS} ${Qt6Widgets_INCLUDE_DIRS})
-	set(QT_LIBRARIES Qt6::Gui Qt6::Widgets)
-	add_definitions(${Qt6Gui_DEFINITIONS} ${Qt6Widgets_DEFINITIONS})
-endif()
-
-if(NOT Qt5Core_FOUND AND NOT Qt6Core_FOUND)
-	message(FATAL_ERROR  "Please install Qt5 or Qt6!")
-endif()
-
-#===============================================================================
-#= boost
-#-------------------------------------------------------------------------------
-find_package(Boost 1.42 QUIET)
-
-if(NOT Boost_FOUND)
-	message(FATAL_ERROR  "Please install boost!")
-endif()
-
-message("----- boost:")
-message(STATUS "	 includes:" ${Boost_INCLUDE_DIRS})
-include_directories(${Boost_INCLUDE_DIRS})
-
-#===============================================================================
-#= Dependencies
-#-------------------------------------------------------------------------------
-
-find_package(Threads)
 
 #===============================================================================
 #= DSView sources
@@ -625,86 +501,23 @@ else()
 	list(APPEND DSVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES})
 endif()
 
-add_executable(${PROJECT_NAME}
-	${common_SOURCES}
-	${DSView_SOURCES}
-	${DSView_HEADERS_MOC}
-	${DSView_FORMS_HEADERS}
-	${DSView_RESOURCES_RCC}
+add_library(${PROJECT_NAME} SHARED
 	${libsigrok4DSL_SOURCES}
-	${libsigrokdecode4DSL_SOURCES}
+	${common_SOURCES}
 )
 
 target_link_libraries(${PROJECT_NAME} ${DSVIEW_LINK_LIBS})
 
-if(WIN32)
-# Pass -mwindows so that no "DOS box" will open when PulseView is started.
-set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-mwindows")
-endif()
-
-if(ENABLE_COTIRE)
-	include(cotire)
-	cotire(${PROJECT_NAME})
-endif()
+set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "libsigrok4DSL/libsigrok.h;libsigrok4DSL/proto.h;libsigrok4DSL/version.h;common/log/xlog.h")
 
 message(STATUS "Output dir: ${CMAKE_CURRENT_SOURCE_DIR}/build.dir")
-set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build.dir")
 
 #===============================================================================
 #= Installation
 #-------------------------------------------------------------------------------
 
-# Install the executable.
-install(TARGETS ${PROJECT_NAME} DESTINATION bin)
-install(DIRECTORY DSView/res DESTINATION share/DSView)
-install(FILES DSView/icons/logo.svg DESTINATION share/DSView RENAME logo.svg)
-install(FILES DSView/icons/logo.svg DESTINATION share/icons/hicolor/scalable/apps RENAME dsview.svg)
-install(FILES DSView/icons/logo.svg DESTINATION share/pixmaps RENAME dsview.svg)
-
-if(CMAKE_SYSTEM_NAME MATCHES "Linux")	
-	install(FILES DSView/DSView.desktop DESTINATION /usr/share/applications RENAME dsview.desktop)
-	
-	if(IS_DIRECTORY /usr/lib/udev/rules.d)
-		install(FILES DSView/DreamSourceLab.rules DESTINATION /usr/lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
-	elseif(IS_DIRECTORY /lib/udev/rules.d)
-		install(FILES DSView/DreamSourceLab.rules DESTINATION /lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
-	elseif(IS_DIRECTORY /etc/udev/rules.d)
-		install(FILES DSView/DreamSourceLab.rules DESTINATION /etc/udev/rules.d RENAME 60-dreamsourcelab.rules)
-	endif()
-
-endif()
-
-install(FILES NEWS25 DESTINATION share/DSView RENAME NEWS25)
-install(FILES NEWS31 DESTINATION share/DSView RENAME NEWS31)
-install(FILES ug25.pdf DESTINATION share/DSView RENAME ug25.pdf)
-install(FILES ug31.pdf DESTINATION share/DSView RENAME ug31.pdf)
-
-install(DIRECTORY libsigrokdecode4DSL/decoders DESTINATION share/libsigrokdecode4DSL)
-
-#===============================================================================
-#= Packaging (handled by CPack)
-#-------------------------------------------------------------------------------
-
-set(CPACK_PACKAGE_VERSION_MAJOR ${DS_VERSION_MAJOR})
-set(CPACK_PACKAGE_VERSION_MINOR ${DS_VERSION_MINOR})
-set(CPACK_PACKAGE_VERSION_PATCH ${DS_VERSION_MICRO})
-set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/DSView/README)
-set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/DSView/COPYING)
-set(CPACK_SOURCE_IGNORE_FILES ${CMAKE_CURRENT_BINARY_DIR} ".gitignore" ".git")
-set(CPACK_SOURCE_PACKAGE_FILE_NAME
-	"${CMAKE_PROJECT_NAME}-${DS_VERSION_MAJOR}.${DS_VERSION_MINOR}.${DS_VERSION_MICRO}")
-set(CPACK_SOURCE_GENERATOR "TGZ")
-
-include(CPack)
-
-#===============================================================================
-#= Tests
-#-------------------------------------------------------------------------------
-
-if(ENABLE_TESTS)
-	add_subdirectory(test)
-	enable_testing()
-	add_test(test ${CMAKE_CURRENT_BINARY_DIR}/DSView/test/DSView-test)
-endif(ENABLE_TESTS)
-
-
+# Install the library.
+install(TARGETS ${PROJECT_NAME}
+	LIBRARY DESTINATION lib
+	PUBLIC_HEADER DESTINATION include
+)
