summaryrefslogtreecommitdiffstats
path: root/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2007-11-08 15:38:26 (GMT)
committerDavid Cole <david.cole@kitware.com>2007-11-08 15:38:26 (GMT)
commit4e752dee910d3901a438d97aedf49357a8cb5628 (patch)
tree3393d691a3e67c13610b9252e2f967d4433f95a6 /Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt
parente615e1416cc5139082593c07db99ead11c6d5d46 (diff)
downloadCMake-4e752dee910d3901a438d97aedf49357a8cb5628.zip
CMake-4e752dee910d3901a438d97aedf49357a8cb5628.tar.gz
CMake-4e752dee910d3901a438d97aedf49357a8cb5628.tar.bz2
ENH: Add new Tutorial steps. Diff between Step5 and Step6 shows how to add a cpack driven installer to your project. Diff between Step6 and Step7 shows how to add ctest dashboard scripting capability.
Diffstat (limited to 'Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt')
-rw-r--r--Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt b/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt
new file mode 100644
index 0000000..8ecddfa
--- /dev/null
+++ b/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt
@@ -0,0 +1,26 @@
+# first we add the executable that generates the table
+add_executable(MakeTable MakeTable.cxx)
+
+get_target_property(MakeTableLocation MakeTable LOCATION)
+
+# add the command to generate the source code
+add_custom_command (
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h
+ DEPENDS MakeTable
+ COMMAND ${MakeTableLocation}
+ ARGS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
+ )
+
+set_source_files_properties (
+ mysqrt.cxx PROPERTIES
+ OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
+ )
+
+# add the binary tree directory to the search path for include files
+include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
+
+# add the main library
+add_library(MathFunctions mysqrt.cxx)
+
+install_targets (/bin MathFunctions)
+install_files (/include FILES MathFunctions.h)