~ubuntu-branches/ubuntu/lucid/cmake/lucid

« back to all changes in this revision

Viewing changes to Tests/Tutorial/Step5/MathFunctions/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Artur Rona
  • Date: 2009-12-16 11:11:54 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091216111154-6accvv6yq86h2hkc
Tags: 2.8.0-5ubuntu1
* Merge from debian testing (LP: #497349). Remaining changes:
  - Keep the Replaces: on cmake-data to cover the Kubuntu version from
    Jaunty in case someone decides to do an (unsupported) Jaunty->Lucid
    upgrade.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# first we add the executable that generates the table
2
 
add_executable(MakeTable MakeTable.cxx)
3
 
 
4
 
get_target_property(MakeTableLocation MakeTable LOCATION)
5
 
 
 
2
# add the binary tree directory to the search path for include files
 
3
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
 
4
 
 
5
add_executable(MakeTable MakeTable.cxx )
6
6
# add the command to generate the source code
7
7
add_custom_command (
8
8
  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h
 
9
  COMMAND MakeTable ${CMAKE_CURRENT_BINARY_DIR}/Table.h
9
10
  DEPENDS MakeTable
10
 
  COMMAND ${MakeTableLocation}
11
 
  ARGS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
12
 
  )
13
 
 
14
 
set_source_files_properties (
15
 
  mysqrt.cxx PROPERTIES 
16
 
  OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
17
 
  )
18
 
 
19
 
# add the binary tree directory to the search path for include files
20
 
include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
 
11
  )
21
12
 
22
13
# add the main library
23
 
add_library(MathFunctions mysqrt.cxx)
 
14
add_library(MathFunctions mysqrt.cxx ${CMAKE_CURRENT_BINARY_DIR}/Table.h  )
24
15
 
25
16
install (TARGETS MathFunctions DESTINATION bin)
26
17
install (FILES MathFunctions.h DESTINATION include)