Switched to CMake
authorDmitriy Morozov <morozov@cs.duke.edu>
Mon, 29 Jan 2007 10:56:09 -0500
changeset 11 b4cd9b9d6ca5
parent 10 240ec9bb3d92
child 12 e8080b26ae1c
Switched to CMake
.hgignore
CMakeLists.txt
README
VEFViewer.pro
main.cpp
viewerInterface.Qt4.ui
viewerInterface.ui
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Mon Jan 29 10:56:09 2007 -0500
@@ -0,0 +1,4 @@
+syntax: glob
+
+CMakeFiles
+CMakeCache.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CMakeLists.txt	Mon Jan 29 10:56:09 2007 -0500
@@ -0,0 +1,21 @@
+project						(VEFViewer)
+
+# Set Qt4 and QGLViewer configuration
+find_package				(Qt4 REQUIRED)
+find_library				(QGLViewer_LIBRARY
+							 NAMES QGLViewer
+							 PATHS /usr/lib /usr/local/lib)
+set							(QT_USE_QTXML    TRUE)
+set							(QT_USE_QTOPENGL TRUE)
+include						(${QT_USE_FILE})
+
+set							(sources VEFViewer.cpp main.cpp sphere.cpp)
+set							(moc_hdrs VEFViewer.h)
+qt4_wrap_cpp				(moc_srcs ${moc_hdrs})
+set							(uis viewerInterface.ui)
+qt4_wrap_ui					(uis_h ${uis})
+include_directories			(${CMAKE_CURRENT_BINARY_DIR} .)
+
+add_executable				(VEFViewer ${sources} ${moc_srcs} ${uis_h})
+target_link_libraries		(VEFViewer ${QT_LIBRARIES} ${QGLViewer_LIBRARY})
+
--- a/README	Mon Aug 07 10:39:15 2006 -0400
+++ b/README	Mon Jan 29 10:56:09 2007 -0500
@@ -1,7 +1,7 @@
 VEFViewer is written by Dmitriy Morozov <morozov@cs.duke.edu>.
 
-It uses Qt4, libQGLViewer, and is licensed under GPL.
+It uses Qt4, libQGLViewer, and cmake for building. It is licensed under GPL.
 
 To build (on Linux):
-qmake
+cmake . (alternatively, mkdir build && cd build && cmake ..)
 make
--- a/VEFViewer.pro	Mon Aug 07 10:39:15 2006 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-TEMPLATE = app
-TARGET   = VEFViewer
-CONFIG  += qt opengl warn_on release thread
-
-HEADERS  = VEFViewer.h sphere.h
-SOURCES  = VEFViewer.cpp sphere.cpp main.cpp
-FORMS   *= viewerInterface.Qt4.ui
-
-# The rest of this configuration file is pretty complex since it tries to automatically
-# detect system paths and configuration. In your applications, you can probably simply use:
-unix:LIBS *= -lQGLViewer
-win32:LIBS *= QGLViewer222.lib (with Visual 6, use QGLViewer2.lib or QGLViewer.lib instead)
-
-# Used by Qt4 only. Adds appropriate include paths.
-QT += xml opengl
--- a/main.cpp	Mon Aug 07 10:39:15 2006 -0400
+++ b/main.cpp	Mon Jan 29 10:56:09 2007 -0500
@@ -1,5 +1,5 @@
 #include <qapplication.h>
-#include "ui_viewerInterface.Qt4.h"
+#include "ui_viewerInterface.h"
 #include "VEFViewer.h"
 
 class ViewerInterface: public QDialog, public Ui::Dialog
--- a/viewerInterface.Qt4.ui	Mon Aug 07 10:39:15 2006 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
- <class>Dialog</class>
- <widget class="QDialog" name="Dialog" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>642</width>
-    <height>475</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>VEFViewer</string>
-  </property>
-  <layout class="QVBoxLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
-   <item>
-    <widget class="QSplitter" name="splitter" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <widget class="QListWidget" name="listWidget" >
-      <property name="sizePolicy" >
-       <sizepolicy>
-        <hsizetype>1</hsizetype>
-        <vsizetype>7</vsizetype>
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="contextMenuPolicy" >
-       <enum>Qt::CustomContextMenu</enum>
-      </property>
-     </widget>
-     <widget class="VEFViewer" name="viewer" >
-      <property name="sizePolicy" >
-       <sizepolicy>
-        <hsizetype>5</hsizetype>
-        <vsizetype>5</vsizetype>
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <customwidgets>
-  <customwidget>
-   <class>VEFViewer</class>
-   <extends>QWidget</extends>
-   <header>VEFViewer.h</header>
-   <container>0</container>
-   <pixmap></pixmap>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/viewerInterface.ui	Mon Jan 29 10:56:09 2007 -0500
@@ -0,0 +1,69 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>642</width>
+    <height>475</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>VEFViewer</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QSplitter" name="splitter" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <widget class="QListWidget" name="listWidget" >
+      <property name="sizePolicy" >
+       <sizepolicy>
+        <hsizetype>1</hsizetype>
+        <vsizetype>7</vsizetype>
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="contextMenuPolicy" >
+       <enum>Qt::CustomContextMenu</enum>
+      </property>
+     </widget>
+     <widget class="VEFViewer" name="viewer" >
+      <property name="sizePolicy" >
+       <sizepolicy>
+        <hsizetype>5</hsizetype>
+        <vsizetype>5</vsizetype>
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>VEFViewer</class>
+   <extends>QWidget</extends>
+   <header>VEFViewer.h</header>
+   <container>0</container>
+   <pixmap></pixmap>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>