File: CMakeLists.txt

package info (click to toggle)
libgdf 0.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,320 kB
  • sloc: cpp: 7,098; makefile: 67; sh: 49
file content (41 lines) | stat: -rw-r--r-- 1,154 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
cmake_minimum_required( VERSION 2.8 )
#project( GDF )

option( BUILD_TESTING "Build tests" OFF )

if( WIN32 )
	set( BUILD_SHARED_LIBS false CACHE BOOL "Whether we shall build shared or dynamic libraries." )
	option( BUILD_PYTHON_MODULES "Build python modules" OFF )
else( WIN32 )
	set( BUILD_SHARED_LIBS true CACHE BOOL "Whether we shall build shared or dynamic libraries." )
	option( BUILD_PYTHON_MODULES "Build python modules" OFF )
endif( WIN32 )

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)

set( GDF_SOURCE_ROOT ${Project_SOURCE_DIR} )

add_subdirectory( libgdf )
add_subdirectory( tools )

# Make sure the version is in sync with
# libgdf/include/GDF/Version.h
set(GDF_VERSION "0.1.3")

# shared library API versioning (soversion) -- NOT the same as the release version
# it follows first number
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()

if( BUILD_PYTHON_MODULES )
	add_subdirectory( python )
endif()