[cmake-commits] alex committed CMakeLists.txt 1.8 1.9 cmFormConfigure.h.in NONE 1.1 form.h 1.6 1.7

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Aug 27 09:01:16 EDT 2007


Update of /cvsroot/CMake/CMake/Source/CursesDialog/form
In directory public:/mounts/ram/cvs-serv32452/Source/CursesDialog/form

Modified Files:
	CMakeLists.txt form.h 
Added Files:
	cmFormConfigure.h.in 
Log Message:

COMP: make it build on NetBSD, which has separate curses and ncurses, so
it has to be detected that curses isn't good enough, but ncurses is, and
that ncurses.h instead of curses.h is included

Alex


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CursesDialog/form/CMakeLists.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CMakeLists.txt	11 Jul 2005 22:07:02 -0000	1.8
+++ CMakeLists.txt	27 Aug 2007 13:01:14 -0000	1.9
@@ -1,7 +1,9 @@
 PROJECT(CMAKE_FORM)
 
 INCLUDE_REGULAR_EXPRESSION("^.*$")
-INCLUDE_DIRECTORIES(${CURSES_INCLUDE_PATH})
+INCLUDE_DIRECTORIES(${CURSES_INCLUDE_PATH} "${CMAKE_CURRENT_BINARY_DIR}")
+
+CONFIGURE_FILE(cmFormConfigure.h.in "${CMAKE_CURRENT_BINARY_DIR}/cmFormConfigure.h")
 
 SET(  FORM_SRCS
              fld_arg.c

Index: form.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CursesDialog/form/form.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- form.h	21 Apr 2005 21:00:36 -0000	1.6
+++ form.h	27 Aug 2007 13:01:14 -0000	1.7
@@ -37,7 +37,19 @@
  #define _MSE_INT_H
 #endif
 
-#include <curses.h>
+#include <cmFormConfigure.h>
+
+/* figure out which curses.h to include */
+# if defined(CURSES_HAVE_NCURSES_H)
+#  include <ncurses.h>
+# elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
+#  include <ncurses/ncurses.h>
+# elif defined(CURSES_HAVE_NCURSES_CURSES_H)
+#  include <ncurses/curses.h>
+# else
+#  include <curses.h>
+# endif
+
 #include <eti.h>
 #include <stdarg.h>
 

--- NEW FILE: cmFormConfigure.h.in ---
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile: cmFormConfigure.h.in,v $
  Language:  C++
  Date:      $Date: 2007/08/27 13:01:14 $
  Version:   $Revision: 1.1 $

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef CMFORMCONFIGURE_H
#define CMFORMCONFIGURE_H

#cmakedefine CURSES_HAVE_CURSES_H
#cmakedefine CURSES_HAVE_NCURSES_H
#cmakedefine CURSES_HAVE_NCURSES_NCURSES_H
#cmakedefine CURSES_HAVE_NCURSES_CURSES_H

#endif



More information about the Cmake-commits mailing list