aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-10-01 17:54:36 +0000
committerDRC <dcommander@users.sourceforge.net>2011-10-01 17:54:36 +0000
commite4e604f6ff1f6da459dac5fd529eed52fa3577b0 (patch)
tree273964b7d5d8ba77bad7144f8ae6b74ee3e1ce1a /CMakeLists.txt
parent27820baecc16e4eae1ecbd1d6bb59bcea98a1532 (diff)
downloadtigervnc-e4e604f6ff1f6da459dac5fd529eed52fa3577b0.tar.gz
tigervnc-e4e604f6ff1f6da459dac5fd529eed52fa3577b0.zip
Fix BUILD_STATIC on MinGW and document the feature
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4683 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3cee4a60..e330dc6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,14 +134,19 @@ if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE AND NOT CYGWIN)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/staticlib)
execute_process(COMMAND ${CMAKE_COMMAND} -E remove
${CMAKE_BINARY_DIR}/staticlib/libstdc++.a)
- execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
- ${LIBSTDCPLUSPLUS} ${CMAKE_BINARY_DIR}/staticlib/libstdc++.a)
+ if(MINGW)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy
+ ${LIBSTDCPLUSPLUS} ${CMAKE_BINARY_DIR}/staticlib/libstdc++.a)
+ else()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
+ ${LIBSTDCPLUSPLUS} ${CMAKE_BINARY_DIR}/staticlib/libstdc++.a)
+ endif()
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -L${CMAKE_BINARY_DIR}/staticlib")
set(CMAKE_SHARED_LINKER_FLAGS
"${CMAKE_SHARED_LINKER_FLAGS} -L${CMAKE_BINARY_DIR}/staticlib")
else()
- message(WARNING Cannot find static libstdc++. VirtualGL will depend on dynamic libstdc++.)
+ message(WARNING Cannot find static libstdc++. TigerVNC will depend on dynamic libstdc++.)
endif()
add_definitions(-static-libgcc)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc")