From a190f46819184e53a7da21ffc067b8c994f28953 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Tue, 12 Apr 2016 23:50:50 +0000
Subject: [PATCH] Remove explicit target_link_libs link interface.

---
 Applications/ApplicationsLib/CMakeLists.txt               | 3 +--
 Applications/DataExplorer/DataView/CMakeLists.txt         | 6 +++---
 .../DataExplorer/DataView/DiagramView/CMakeLists.txt      | 2 +-
 .../DataExplorer/DataView/StratView/CMakeLists.txt        | 2 +-
 Applications/DataExplorer/VtkAct/CMakeLists.txt           | 4 ++--
 Applications/DataExplorer/VtkVis/CMakeLists.txt           | 6 +++---
 AssemblerLib/CMakeLists.txt                               | 2 +-
 BaseLib/CMakeLists.txt                                    | 4 ++--
 FileIO/CMakeLists.txt                                     | 8 ++++----
 GeoLib/CMakeLists.txt                                     | 2 +-
 InSituLib/CMakeLists.txt                                  | 2 +-
 MeshGeoToolsLib/CMakeLists.txt                            | 2 +-
 MeshLib/CMakeLists.txt                                    | 2 +-
 NumLib/CMakeLists.txt                                     | 2 +-
 ProcessLib/CMakeLists.txt                                 | 2 +-
 15 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt
index 44f4d464307..6316f23afea 100644
--- a/Applications/ApplicationsLib/CMakeLists.txt
+++ b/Applications/ApplicationsLib/CMakeLists.txt
@@ -4,8 +4,7 @@ set(LIB_SOURCES ProjectData.cpp)
 # Library
 add_library(ApplicationsLib ${LIB_SOURCES})
 
-target_link_libraries(ApplicationsLib INTERFACE
-	GeoLib
+target_link_libraries(ApplicationsLib
 	MeshGeoToolsLib
 	NumLib
 	ProcessLib
diff --git a/Applications/DataExplorer/DataView/CMakeLists.txt b/Applications/DataExplorer/DataView/CMakeLists.txt
index 20a39e03f13..8797c0b0872 100644
--- a/Applications/DataExplorer/DataView/CMakeLists.txt
+++ b/Applications/DataExplorer/DataView/CMakeLists.txt
@@ -130,8 +130,8 @@ add_library(QtDataView
 	${UIS}
 )
 
-target_link_libraries(QtDataView PUBLIC Qt4::QtCore Qt4::QtGui)
-target_link_libraries(QtDataView INTERFACE
+target_link_libraries(QtDataView Qt4::QtCore Qt4::QtGui)
+target_link_libraries(QtDataView
 	FileIO
 	DataHolderLib
 	QtBase
@@ -141,7 +141,7 @@ add_dependencies(QtDataView QtDiagramView QtStratView)
 ADD_VTK_DEPENDENCY(QtDataView)
 
 if(GEOTIFF_FOUND)
-	target_link_libraries( QtDataView INTERFACE ${GEOTIFF_LIBRARIES} )
+	target_link_libraries( QtDataView ${GEOTIFF_LIBRARIES} )
 endif () # GEOTIFF_FOUND
 
 set_property(TARGET QtDataView PROPERTY FOLDER "DataExplorer")
diff --git a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt
index f5853e2266f..7dc4a155a1f 100644
--- a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt
+++ b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt
@@ -39,6 +39,6 @@ add_library(QtDiagramView
 	${UIS}
 )
 
-target_link_libraries(QtDiagramView PUBLIC Qt4::QtGui)
+target_link_libraries(QtDiagramView Qt4::QtGui)
 
 set_property(TARGET QtDiagramView PROPERTY FOLDER "DataExplorer")
diff --git a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt
index 369bd663eb9..429e13c37f9 100644
--- a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt
+++ b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt
@@ -30,6 +30,6 @@ add_library(QtStratView
 	${UIS}
 )
 
-target_link_libraries(QtStratView PUBLIC Qt4::QtGui)
+target_link_libraries(QtStratView Qt4::QtGui)
 
 set_property(TARGET QtStratView PROPERTY FOLDER "DataExplorer")
diff --git a/Applications/DataExplorer/VtkAct/CMakeLists.txt b/Applications/DataExplorer/VtkAct/CMakeLists.txt
index a5e92c7713d..387b5c62d31 100644
--- a/Applications/DataExplorer/VtkAct/CMakeLists.txt
+++ b/Applications/DataExplorer/VtkAct/CMakeLists.txt
@@ -25,7 +25,7 @@ add_library( VtkAct
 
 ADD_VTK_DEPENDENCY(VtkAct)
 
-target_link_libraries( VtkAct PUBLIC Qt4::QtCore )
-target_link_libraries( VtkAct INTERFACE ${VTK_LIBRARIES} )
+target_link_libraries( VtkAct Qt4::QtCore )
+target_link_libraries( VtkAct ${VTK_LIBRARIES} )
 
 set_property(TARGET VtkAct PROPERTY FOLDER "DataExplorer")
diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt
index a0011f7f7d1..0e929f36f8c 100644
--- a/Applications/DataExplorer/VtkVis/CMakeLists.txt
+++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt
@@ -123,11 +123,11 @@ ADD_VTK_DEPENDENCY(VtkVis)
 
 if(GEOTIFF_FOUND)
 	include_directories(${GEOTIFF_INCLUDE_DIRS})
-	target_link_libraries(VtkVis INTERFACE ${GEOTIFF_LIBRARIES})
+	target_link_libraries(VtkVis ${GEOTIFF_LIBRARIES})
 endif() # GEOTIFF_FOUND
 
-target_link_libraries(VtkVis PUBLIC Qt4::QtGui QtDataView)
-target_link_libraries(VtkVis INTERFACE VtkAct)
+target_link_libraries(VtkVis Qt4::QtGui QtDataView)
+target_link_libraries(VtkVis VtkAct)
 
 if(VTKOSGCONVERTER_FOUND)
 	USE_OPENSG(VtkVis)
diff --git a/AssemblerLib/CMakeLists.txt b/AssemblerLib/CMakeLists.txt
index b6830e3fd24..6595966e21b 100644
--- a/AssemblerLib/CMakeLists.txt
+++ b/AssemblerLib/CMakeLists.txt
@@ -7,7 +7,7 @@ set(SOURCES ${SOURCES_ASSEMBLERLIB})
 # Create the library
 add_library(AssemblerLib ${SOURCES})
 
-target_link_libraries(AssemblerLib INTERFACE
+target_link_libraries(AssemblerLib
 	MeshLib
 )
 
diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt
index 773810adcb8..cd973a28f8a 100644
--- a/BaseLib/CMakeLists.txt
+++ b/BaseLib/CMakeLists.txt
@@ -7,12 +7,12 @@ add_library(BaseLib ${SOURCES})
 
 set_target_properties(BaseLib PROPERTIES LINKER_LANGUAGE CXX)
 
-target_link_libraries(BaseLib INTERFACE
+target_link_libraries(BaseLib
 	logog
 )
 
 if(MSVC)
-	target_link_libraries(BaseLib INTERFACE WinMM) # needed for timeGetTime
+	target_link_libraries(BaseLib WinMM) # needed for timeGetTime
 endif()
 
 if(TARGET Eigen)
diff --git a/FileIO/CMakeLists.txt b/FileIO/CMakeLists.txt
index 28eb031844f..3c2152b5ca4 100644
--- a/FileIO/CMakeLists.txt
+++ b/FileIO/CMakeLists.txt
@@ -55,24 +55,24 @@ include(${PROJECT_SOURCE_DIR}/scripts/cmake/OGSEnabledElements.cmake)
 # Create the library
 add_library(FileIO ${SOURCES})
 
-target_link_libraries(FileIO INTERFACE
+target_link_libraries(FileIO
 	GeoLib
 	InSituLib
 	MeshLib
 	logog
 )
 if(QT4_FOUND)
-	target_link_libraries(FileIO PUBLIC Qt4::QtXml Qt4::QtXmlPatterns)
+	target_link_libraries(FileIO Qt4::QtXml Qt4::QtXmlPatterns)
 	if(WIN32 AND CMAKE_CROSSCOMPILING)
 		find_package(OpenSSL)
 		if(OPENSSL_FOUND)
-			target_link_libraries(FileIO PUBLIC Qt4::QtNetwork ${OPENSSL_LIBRARIES} ws2_32)
+			target_link_libraries(FileIO Qt4::QtNetwork ${OPENSSL_LIBRARIES} ws2_32)
 		endif()
 	endif()
 endif()
 
 if(Shapelib_FOUND)
-	target_link_libraries(FileIO INTERFACE ${Shapelib_LIBRARIES})
+	target_link_libraries(FileIO ${Shapelib_LIBRARIES})
 endif()
 
 ADD_VTK_DEPENDENCY(FileIO)
diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt
index e87d2d7076a..7efcc2985af 100644
--- a/GeoLib/CMakeLists.txt
+++ b/GeoLib/CMakeLists.txt
@@ -6,7 +6,7 @@ add_library(GeoLib ${SOURCES_GeoLib}
 	${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/tetgen/predicates.cxx
 )
 
-target_link_libraries(GeoLib INTERFACE
+target_link_libraries(GeoLib
 	BaseLib
 	MathLib
 	logog
diff --git a/InSituLib/CMakeLists.txt b/InSituLib/CMakeLists.txt
index 957f1907d1b..0118d290cc4 100644
--- a/InSituLib/CMakeLists.txt
+++ b/InSituLib/CMakeLists.txt
@@ -9,7 +9,7 @@ add_library(InSituLib
 	VtkMeshNodalCoordinatesTemplate-impl.h
 )
 
-target_link_libraries(InSituLib INTERFACE MeshLib ${VTK_LIBRARIES})
+target_link_libraries(InSituLib MeshLib ${VTK_LIBRARIES})
 
 ADD_VTK_DEPENDENCY(InSituLib)
 
diff --git a/MeshGeoToolsLib/CMakeLists.txt b/MeshGeoToolsLib/CMakeLists.txt
index 35f50173331..19fcf7d9ee3 100644
--- a/MeshGeoToolsLib/CMakeLists.txt
+++ b/MeshGeoToolsLib/CMakeLists.txt
@@ -4,7 +4,7 @@ GET_SOURCE_FILES(SOURCES_MeshGeoToolsLib)
 # Create the library
 add_library(MeshGeoToolsLib ${SOURCES_MeshGeoToolsLib})
 
-target_link_libraries(MeshGeoToolsLib INTERFACE
+target_link_libraries(MeshGeoToolsLib
 	BaseLib
 	MathLib
 	MeshLib
diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt
index 7083f7f75a8..4e783d668d7 100644
--- a/MeshLib/CMakeLists.txt
+++ b/MeshLib/CMakeLists.txt
@@ -17,7 +17,7 @@ set(SOURCES ${SOURCES_MESHLIB} ${SOURCES_ELEMENTS} ${SOURCES_EDITING} ${SOURCES_
 # Create the library
 add_library(MeshLib ${SOURCES})
 
-target_link_libraries(MeshLib INTERFACE
+target_link_libraries(MeshLib
 	BaseLib
 	GeoLib
 	MathLib
diff --git a/NumLib/CMakeLists.txt b/NumLib/CMakeLists.txt
index f1124ed24bf..536ac05c02a 100644
--- a/NumLib/CMakeLists.txt
+++ b/NumLib/CMakeLists.txt
@@ -33,7 +33,7 @@ add_library(NumLib ${SOURCES})
 
 set_target_properties(NumLib PROPERTIES LINKER_LANGUAGE CXX)
 
-target_link_libraries(NumLib INTERFACE
+target_link_libraries(NumLib
 	BaseLib
 	GeoLib
 	MathLib
diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt
index 52227d6fed9..d8bffbd0bec 100644
--- a/ProcessLib/CMakeLists.txt
+++ b/ProcessLib/CMakeLists.txt
@@ -8,7 +8,7 @@ APPEND_SOURCE_FILES(SOURCES GroundwaterFlow)
 
 add_library(ProcessLib ${SOURCES})
 
-target_link_libraries(ProcessLib INTERFACE
+target_link_libraries(ProcessLib
     AssemblerLib
     MeshLib
     MeshGeoToolsLib
-- 
GitLab