File: CMakeLists.txt

package info (click to toggle)
dislocker 0.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,052 kB
  • sloc: ansic: 8,672; ruby: 175; makefile: 119; sh: 21
file content (58 lines) | stat: -rw-r--r-- 1,985 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Dislocker -- enables to read/write on BitLocker encrypted partitions under
# Linux
# Copyright (C) 2012-2013  Romain Coltel, Hervé Schauer Consultants
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
# USA.

cmake_minimum_required (VERSION 2.6)
project (dislocker C)

set (AUTHOR "Romain Coltel")

find_program (GIT_EXE NAMES git PATHS /usr/bin /usr/local/bin)

if(GIT_EXE)
	execute_process (
		COMMAND ${GIT_EXE} rev-parse --abbrev-ref HEAD
		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
		OUTPUT_VARIABLE GIT_RELEASE_BRANCH
	)
	execute_process (
		COMMAND ${GIT_EXE} log -n 1 --pretty=format:%t
		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
		OUTPUT_VARIABLE GIT_RELEASE_COMMIT
	)
	string (STRIP "${GIT_RELEASE_BRANCH}" GIT_RELEASE_BRANCH)
	string (STRIP "${GIT_RELEASE_COMMIT}" GIT_RELEASE_COMMIT)
	add_definitions (-DVERSION_DBG="${GIT_RELEASE_BRANCH}:${GIT_RELEASE_COMMIT}")
endif()


set (VERSION_MAJOR 0)
set (VERSION_MINOR 7)
set (VERSION_RELEASE 2)
set (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")

add_subdirectory (${PROJECT_SOURCE_DIR}/src)

configure_file(
	"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
	"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
	IMMEDIATE @ONLY
)
add_custom_target(uninstall
	COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
)