X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=CMakeLists.txt;h=3859c9133b61e01ffb93599f684fd550470e6a48;hb=11a04e2a8ed47ed159b68cbe6f56aedd388e445f;hp=5ec003fc44e94f283715c883812f2357d67390d7;hpb=3fad19663ccb612845e5ed2ef58799eb3e78efce;p=pulseview.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ec003f..3859c91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,6 +213,13 @@ if(ENABLE_DECODE) ) endif() +if(WIN32) + # Use the sigrok icon for the pulseview.exe executable. + set(CMAKE_RC_COMPILE_OBJECT "${CMAKE_RC_COMPILER} -O coff -I${CMAKE_CURRENT_SOURCE_DIR} ") + enable_language(RC) + list(APPEND pulseview_SOURCES pulseviewico.rc) +endif() + qt4_wrap_cpp(pulseview_HEADERS_MOC ${pulseview_HEADERS}) qt4_wrap_ui(pulseview_FORMS_HEADERS ${pulseview_FORMS}) qt4_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES}) @@ -271,6 +278,15 @@ else() list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES}) endif() +if(WIN32) + # On Windows we need to statically link the libqsvg imageformat + # plugin (and the QtSvg component) for SVG graphics/icons to work. + add_definitions(-DQT_STATICPLUGIN) + link_directories("${QT_PLUGINS_DIR}/imageformats") + list(APPEND PULSEVIEW_LINK_LIBS ${QT_QTSVG_LIBRARY}) + list(APPEND PULSEVIEW_LINK_LIBS "-lqsvg") +endif() + add_executable(${PROJECT_NAME} ${pulseview_SOURCES} ${pulseview_HEADERS_MOC}