Revision: 9404
http://plplot.svn.sourceforge.net/plplot/?rev=9404&view=rev
Author: airwin
Date: 2009-01-27 01:49:50 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Add "hello, world" C library project for testing CMake.
Added Paths:
-----------
branches/test_cmake/test_c_library_build/
branches/test_cmake/test_c_library_build/CMakeLists.txt
branches/test_cmake/test_c_library_build/Demo/
branches/test_cmake/test_c_library_build/Demo/CMakeLists.txt
branches/test_cmake/test_c_library_build/Demo/demo.c
branches/test_cmake/test_c_library_build/Hello/
branches/test_cmake/test_c_library_build/Hello/CMakeLists.txt
branches/test_cmake/test_c_library_build/Hello/hello.c
Added: branches/test_cmake/test_c_library_build/CMakeLists.txt
===================================================================
--- branches/test_cmake/test_c_library_build/CMakeLists.txt (rev 0)
+++ branches/test_cmake/test_c_library_build/CMakeLists.txt 2009-01-27 01:49:50 UTC (rev 9404)
@@ -0,0 +1,11 @@
+# The name of our project is "HELLO". CMakeLists files in this project can
+# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and
+# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
+cmake_minimum_required (VERSION 2.6)
+project (HELLO C)
+
+# Recurse into the "Hello" and "Demo" subdirectories. This does not actually
+# cause another cmake executable to run. The same process will walk through
+# the project's entire directory structure.
+add_subdirectory (Hello)
+add_subdirectory (Demo)
Property changes on: branches/test_cmake/test_c_library_build/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: branches/test_cmake/test_c_library_build/Demo/CMakeLists.txt
===================================================================
--- branches/test_cmake/test_c_library_build/Demo/CMakeLists.txt (rev 0)
+++ branches/test_cmake/test_c_library_build/Demo/CMakeLists.txt 2009-01-27 01:49:50 UTC (rev 9404)
@@ -0,0 +1,12 @@
+# Make sure the compiler can find include files from our Hello library.
+include_directories (${HELLO_SOURCE_DIR}/Hello)
+
+# Make sure the linker can find the Hello library once it is built.
+link_directories (${HELLO_BINARY_DIR}/Hello)
+
+# Add executable called "helloDemo" that is built from the source files
+# "demo.c". The extensions are automatically found.
+add_executable (helloDemo demo.c)
+
+# Link the executable to the Hello library.
+target_link_libraries (helloDemo Hello)
\ No newline at end of file
Property changes on: branches/test_cmake/test_c_library_build/Demo/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: branches/test_cmake/test_c_library_build/Demo/demo.c
===================================================================
--- branches/test_cmake/test_c_library_build/Demo/demo.c (rev 0)
+++ branches/test_cmake/test_c_library_build/Demo/demo.c 2009-01-27 01:49:50 UTC (rev 9404)
@@ -0,0 +1,5 @@
+int main()
+{
+ hello();
+ return 0;
+}
Property changes on: branches/test_cmake/test_c_library_build/Demo/demo.c
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Added: branches/test_cmake/test_c_library_build/Hello/CMakeLists.txt
===================================================================
--- branches/test_cmake/test_c_library_build/Hello/CMakeLists.txt (rev 0)
+++ branches/test_cmake/test_c_library_build/Hello/CMakeLists.txt 2009-01-27 01:49:50 UTC (rev 9404)
@@ -0,0 +1,3 @@
+# Create a library called "Hello" which includes the source file "hello.cxx".
+# The extension is already found. Any number of sources could be listed here.
+add_library (Hello hello.c)
\ No newline at end of file
Property changes on: branches/test_cmake/test_c_library_build/Hello/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: branches/test_cmake/test_c_library_build/Hello/hello.c
===================================================================
--- branches/test_cmake/test_c_library_build/Hello/hello.c (rev 0)
+++ branches/test_cmake/test_c_library_build/Hello/hello.c 2009-01-27 01:49:50 UTC (rev 9404)
@@ -0,0 +1,5 @@
+#include <stdio.h>
+void hello()
+{
+ printf("hello, world\n");
+}
Property changes on: branches/test_cmake/test_c_library_build/Hello/hello.c
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|