From 754ff598d5c21605ed4dbf02ec938acb168f5dba Mon Sep 17 00:00:00 2001
From: DRC <dcommander@users.sourceforge.net>
Date: Tue, 9 Aug 2011 02:26:30 +0000
Subject: (Re-)fix static Xvnc build.  We can leverage the BUILD_STATIC option
 to modify our fake libtool scripts such that they pick up the static
 libstdc++.a.  Unfortunately, adding -static-libgcc to those scripts makes
 libtool barf, so we still have to add that flag to LDFLAGS in build-xorg.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4614 3789f03b-4d11-0410-bbf8-ca57d06f2519
---
 cmake/Modules/CMakeMacroLibtoolFile.cmake | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'cmake/Modules')

diff --git a/cmake/Modules/CMakeMacroLibtoolFile.cmake b/cmake/Modules/CMakeMacroLibtoolFile.cmake
index df9d49f8..0cf7b9fb 100644
--- a/cmake/Modules/CMakeMacroLibtoolFile.cmake
+++ b/cmake/Modules/CMakeMacroLibtoolFile.cmake
@@ -77,6 +77,10 @@ macro(libtool_create_control_file _target)
   get_filename_component(_lname ${_target_location} NAME_WE)
   set(_laname ${CMAKE_CURRENT_BINARY_DIR}/${_lname}.la)
  
+  if(BUILD_STATIC)
+    set(_target_dependency_libs "${_target_dependency_libs} -L${CMAKE_BINARY_DIR}/staticlib")
+  endif()
+
   file(WRITE ${_laname} "# ${_lname}.la - a libtool library file\n# Generated by ltmain.sh (GNU libtool) 2.2.6b\n")
   file(APPEND ${_laname} "dlname=''\n\n")
   file(APPEND ${_laname} "library_names=''\n\n")
-- 
cgit v1.2.3