Revision: 4185
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4185&view=rev
Author:   dcommander
Date:     2010-11-09 19:24:12 +0000 (Tue, 09 Nov 2010)

Log Message:
-----------
Generate config.h for Windows build

Modified Paths:
--------------
    trunk/CMakeLists.txt

Added Paths:
-----------
    trunk/config.h.cmake.in

Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt        2010-11-04 18:20:15 UTC (rev 4184)
+++ trunk/CMakeLists.txt        2010-11-09 19:24:12 UTC (rev 4185)
@@ -85,6 +85,22 @@
     "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> --output-format=coff 
<SOURCE>")
 endif()
 
+# Generate config.h
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
+set(CMAKE_REQUIRED_LIBRARIES ws2_32)
+check_function_exists(inet_aton HAVE_INET_ATON)
+check_function_exists(inet_ntop HAVE_INET_NTOP)
+set(CMAKE_EXTRA_INCLUDE_FILES) 
+set(CMAKE_REQUIRED_LIBRARIES)
+check_function_exists(snprintf HAVE_SNPRINTF)
+check_function_exists(strcasecmp HAVE_STRCASECMP)
+check_function_exists(strncasecmp HAVE_STRNCASECMP)
+check_function_exists(vsnprintf HAVE_VSNPRINTF)
+configure_file(config.h.cmake.in config.h)
+add_definitions(-DHAVE_CONFIG_H)
+include_directories(${CMAKE_BINARY_DIR})
 
 add_subdirectory(common)
 add_subdirectory(win)

Added: trunk/config.h.cmake.in
===================================================================
--- trunk/config.h.cmake.in                             (rev 0)
+++ trunk/config.h.cmake.in     2010-11-09 19:24:12 UTC (rev 4185)
@@ -0,0 +1,6 @@
+#cmakedefine HAVE_INET_ATON
+#cmakedefine HAVE_INET_NTOP
+#cmakedefine HAVE_SNPRINTF
+#cmakedefine HAVE_STRCASECMP
+#cmakedefine HAVE_STRNCASECMP
+#cmakedefine HAVE_VSNPRINTF


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to