~ubuntu-branches/ubuntu/oneiric/libclaw/oneiric

« back to all changes in this revision

Viewing changes to examples/dynamic_library/CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge
  • Date: 2010-12-23 20:55:14 UTC
  • mfrom: (4.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101223205514-s10m6ywla7s4ttqf
Tags: 1.6.1-3
UploadĀ inĀ sid

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
1
cmake_minimum_required(VERSION 2.6)
2
2
 
3
 
PROJECT(claw-dynamic_library-example)
 
3
project(claw-dynamic_library-example)
4
4
 
5
5
# check profiling mode
6
 
IF( CMAKE_BUILD_TYPE MATCHES profile )
7
 
  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -pg" )
8
 
ENDIF( CMAKE_BUILD_TYPE MATCHES profile )
 
6
if( CMAKE_BUILD_TYPE MATCHES profile )
 
7
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -pg" )
 
8
endif( CMAKE_BUILD_TYPE MATCHES profile )
9
9
 
10
10
# check DEBUG mode
11
 
IF( CMAKE_BUILD_TYPE MATCHES debug )
12
 
  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DEBUG" )
13
 
ENDIF( CMAKE_BUILD_TYPE MATCHES debug )
 
11
if( CMAKE_BUILD_TYPE MATCHES debug )
 
12
  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DEBUG" )
 
13
endif( CMAKE_BUILD_TYPE MATCHES debug )
14
14
 
15
15
# common flags
16
 
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -pedantic -Wall" )
 
16
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -pedantic -Wall" )
17
17
 
18
18
#-------------------------------------------------------------------------------
19
19
# look for libraries
20
 
INCLUDE( FindCLAW )
21
 
 
22
 
ADD_DEFINITIONS( ${CLAW_DEFINITIONS} )
23
 
INCLUDE_DIRECTORIES( ${CLAW_INCLUDE_DIRECTORY} )
24
 
LINK_DIRECTORIES( ${CLAW_LINK_DIRECTORY} )
25
 
 
26
 
ADD_LIBRARY( func SHARED func.cpp )
27
 
ADD_EXECUTABLE( ex-dynamic_library main.cpp )
28
 
 
29
 
TARGET_LINK_LIBRARIES( ex-dynamic_library ${CLAW_DYNAMIC_LIBRARY_LIBRARIES} )
 
20
include( FindCLAW )
 
21
 
 
22
add_definitions( ${CLAW_DEFINITIONS} )
 
23
include_directories( ${CLAW_INCLUDE_DIRECTORY} )
 
24
link_directories( ${CLAW_LINK_DIRECTORY} )
 
25
 
 
26
add_library( func SHARED func.cpp )
 
27
add_executable( ex-dynamic_library main.cpp )
 
28
 
 
29
target_link_libraries( ex-dynamic_library ${CLAW_DYNAMIC_LIBRARY_LIBRARIES} )