Kaynağa Gözat

If Gold linker is used, link against X11 libraries to avoid error.

To avoid complaints about undefined symbol 'XGetWindowAttributes',
'XCreateWindow', ..., let's link VisualizationVTKCore against X11 libraries.
Jean-Christophe Fillion-Robin 14 yıl önce
ebeveyn
işleme
629cfae77d
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      Libs/Visualization/VTK/Core/CMakeLists.txt

+ 7 - 0
Libs/Visualization/VTK/Core/CMakeLists.txt

@@ -62,6 +62,13 @@ SET(VTK_LIBRARIES
   vtkHybrid
   )
 
+IF(Q_WS_X11)
+  # If the faster 'gold' linker is used, to avoid complaints about undefined symbol
+  # 'XGetWindowAttributes', 'XCreateWindow', ..., let's link against X11 libraries.
+  FIND_PACKAGE(X11)
+  LIST(APPEND VTK_LIBRARIES ${X11_LIBRARIES})
+ENDIF()
+
 # Target libraries - See CMake/ctkFunctionGetTargetLibraries.cmake
 # The following macro will read the target libraries from the file 'target_libraries.cmake'
 ctkFunctionGetTargetLibraries(KIT_target_libraries)