~ubuntu-branches/ubuntu/saucy/libgdf/saucy-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required( VERSION 2.8 )
#project( GDF )

option( BUILD_TESTING "Build tests" OFF )

if( WIN32 )
	set( BUILD_SHARED_LIBS false CACHE BOOL "Wether we shall build shared or dynamic libraries." )
else( WIN32 )
	set( BUILD_SHARED_LIBS true CACHE BOOL "Wether we shall build shared or dynamic libraries." )
endif( WIN32 )

set( GDF_SOURCE_ROOT ${Project_SOURCE_DIR} )

add_subdirectory( libgdf )
add_subdirectory( tools )

# shared library API versioning (soversion) -- NOT the same as the release version
# it follows first number
set(GDF_VERSION "0.1.2")
string( REGEX MATCH "^[0-9]+" GDF_SHAREDLIB_SOVERSION ${GDF_VERSION})

set_target_properties(GDF PROPERTIES
	VERSION ${GDF_VERSION}
	SOVERSION ${GDF_SHAREDLIB_SOVERSION})

if (BUILD_TESTING)
	include( CTest )
	enable_testing( )
	add_subdirectory( test )
endif()