CMakeLists.txt (b858c0c09eda5b2ba5c458d02044e1169ce2f032) CMakeLists.txt (7469b4d151d90e9053add0650f258acd6b481f45)
1#
2# Copyright 2013 Dominic Spill
3#
4# This file is part of Libbtbb.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)

--- 29 unchanged lines hidden (view full) ---

38#
39# find_package(BTBB)
40# if(LIBBTBB_FOUND)
41# message( FATAL_ERROR
42# "An existing installation of libbtbb is already present on this system. Please remove it, and any depending applications before building. A helper script is provided, run\n$ sudo ../cmake/cleanup.sh -d\nto find and remove libbtbb and libubertooth and the ubertooth tools")
43# endif()
44#endif()
45
1#
2# Copyright 2013 Dominic Spill
3#
4# This file is part of Libbtbb.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2, or (at your option)

--- 29 unchanged lines hidden (view full) ---

38#
39# find_package(BTBB)
40# if(LIBBTBB_FOUND)
41# message( FATAL_ERROR
42# "An existing installation of libbtbb is already present on this system. Please remove it, and any depending applications before building. A helper script is provided, run\n$ sudo ../cmake/cleanup.sh -d\nto find and remove libbtbb and libubertooth and the ubertooth tools")
43# endif()
44#endif()
45
46# automatic git version when working out of git
47execute_process(COMMAND git log --pretty=format:%h -n 1
48 OUTPUT_VARIABLE GIT_VERSION)
49
50MESSAGE(STATUS "Git version set to ${GIT_VERSION}")
51
52execute_process(COMMAND git status -s --untracked-files=no | grep modified
53 RESULT_VARIABLE DIRTY)
54
55if( ${DIRTY} EQUAL "0" )
56 MESSAGE(STATUS "Modifications found since last commit")
57 set(DIRTY_FLAG "*")
58endif( ${DIRTY} EQUAL "0" )
59
60set( VERSION ${MAJOR_VERSION}.${MINOR_VERSION} )
61set( RELEASE git-${GIT_VERSION}${DIRTY_FLAG} )
62
63add_definitions( -DVERSION="${VERSION}" )
64add_definitions( -DRELEASE="${RELEASE}" )
65
66# Comment the following out for releases.
67set(CMAKE_C_FLAGS "$ENV{CFLAGS}")
68
46add_subdirectory(lib)
47if(NOT DISABLE_PYTHON)
48 add_subdirectory(python)
49endif()
50
69add_subdirectory(lib)
70if(NOT DISABLE_PYTHON)
71 add_subdirectory(python)
72endif()
73
51# Comment the following out for releases.
52set(CMAKE_C_FLAGS "$ENV{CFLAGS}")
53
54# Create uninstall target
55configure_file(
56 ${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
57 ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
58@ONLY)
59
60add_custom_target(uninstall
61 ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
62)
74# Create uninstall target
75configure_file(
76 ${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
77 ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
78@ONLY)
79
80add_custom_target(uninstall
81 ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
82)