Fixed the icon problem Dirk found.

We really should choose between qmake and cmake. I wouldn't care about cmake if qmake was building the UTs...
>From 8eeea28a523fd6ef588d81b82ab904d4512b3d7a Mon Sep 17 00:00:00 2001
From: Patrick Valsecchi <[email protected]>
Date: Tue, 24 Feb 2015 09:06:37 +0100
Subject: [PATCH 3/3] Cmake build now contains icons

Signed-off-by: Patrick Valsecchi <[email protected]>
---
 CMakeLists.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c8b7e6..85b24ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,7 +224,8 @@ SET(SUBSURFACE_APP
 )
 
 FILE(GLOB SUBSURFACE_UI qt-ui/*.ui)
-QT5_WRAP_UI( SUBSURFACE_UI_HDRS ${SUBSURFACE_UI} )
+QT5_WRAP_UI(SUBSURFACE_UI_HDRS ${SUBSURFACE_UI})
+QT5_ADD_RESOURCES(SUBSURFACE_RESOURCES subsurface.qrc)
 
 ADD_LIBRARY(subsurface_corelib STATIC ${SUBSURFACE_CORE_LIB_SRCS} )
 TARGET_LINK_LIBRARIES(subsurface_corelib ${QT_LIBRARIES})
@@ -233,10 +234,11 @@ TARGET_LINK_LIBRARIES(subsurface_profile ${QT_LIBRARIES})
 ADD_LIBRARY(subsurface_statistics STATIC ${SUBSURFACE_STATISTICS_LIB_SRCS})
 TARGET_LINK_LIBRARIES(subsurface_statistics ${QT_LIBRARIES})
 ADD_LIBRARY(subsurface_generated_ui STATIC ${SUBSURFACE_UI_HDRS})
+TARGET_LINK_LIBRARIES(subsurface_generated_ui ${QT_LIBRARIES})
 ADD_LIBRARY(subsurface_interface STATIC ${SUBSURFACE_INTERFACE})
 TARGET_LINK_LIBRARIES(subsurface_interface ${QT_LIBRARIES} ${MARBLE_LIBRARIES})
 
-ADD_EXECUTABLE(subsurface ${SUBSURFACE_APP} ${SUBSURFACE_QRC_HRDS} )
+ADD_EXECUTABLE(subsurface ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES})
 target_link_libraries( subsurface
   subsurface_generated_ui
   subsurface_interface
-- 
2.1.0

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to