[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [brprint3d] /: Better separation with static libraries
From:       Tomaz Canabrava <tomaz.canabrava () intel ! com>
Date:       2015-11-30 23:47:40
Message-ID: E1a3YAW-0000MT-Te () scm ! kde ! org
[Download RAW message or body]

Git commit 00fcc59ac5d854b3ca19bcd32395480081df057d by Tomaz Canabrava.
Committed on 30/11/2015 at 22:42.
Pushed by tcanabrava into branch 'master'.

Better separation with static libraries

It's easier to inspect with ldd if the code is separated
in smaller bits.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>

M  +9    -5    CMakeLists.txt

http://commits.kde.org/brprint3d/00fcc59ac5d854b3ca19bcd32395480081df057d

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ebf9af..09c3334 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,8 +27,9 @@ set(KI_SRCS
 	KI/Repetier.cpp
 	KI/StringRepetierOps.cpp
 )
+add_library(KI STATIC ${KI_SRCS})
 =

-set(Widgets_SRCS
+set(Dialogs_SRCS
 	Windows/aboutbrprint.cpp
 	Windows/documentation.cpp
 	Windows/help.cpp
@@ -36,11 +37,12 @@ set(Widgets_SRCS
 	Windows/loading.cpp
 	Windows/warning.cpp
 )
+add_library(BRPrintDialogs STATIC ${Dialogs_SRCS})
+target_link_libraries(BRPrintDialogs Qt5::Widgets)
 =

-set(Br-Print_SRCS
+set(BRPrintInterface_SRCS
 	arduinolistener.cpp
 	brprint3d.cpp
-        main.cpp
 	vtkWidget.cpp
         PrinterSettingsWidget.cpp
         PrinterSettings.cpp
@@ -48,6 +50,8 @@ set(Br-Print_SRCS
         ExtruderControlWidget.cpp
         BigButton.cpp
 )
+add_library(BRPRintInterface STATIC ${BRPrintInterface_SRCS})
+target_link_libraries(BRPRintInterface KI Qt5::Widgets)
 =

 #qt5_add_translation(TRANSLATIONS EN_english.ts PT_portuguese.ts)
 =

@@ -63,8 +67,8 @@ add_custom_target(resources ALL DEPENDS ${Resources})
 =

 #add_dependencies(resources translations)
 =

-add_executable(BRPrint ${KI_SRCS} ${Widgets_SRCS} ${Br-Print_SRCS} ${Resou=
rces})
+add_executable(BRPrint main.cpp ${Resources})
 =

-target_link_libraries(BRPrint Qt5::Core Qt5::Widgets Qt5::OpenGL ${OPENGL_=
LIBRARIES} ${VTK_LIBRARIES})
+target_link_libraries(BRPrint Qt5::Core Qt5::Widgets Qt5::OpenGL ${OPENGL_=
LIBRARIES} ${VTK_LIBRARIES} BRPrintDialogs BRPRintInterface)
 =

 enable_testing()

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic