xref: /libbtbb/CMakeLists.txt (revision 25d64f63a355f4c01d10cf4f69da1c2246b040d9)
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)
9# any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; see the file COPYING.  If not, write to
18# the Free Software Foundation, Inc., 51 Franklin Street,
19# Boston, MA 02110-1301, USA.
20#
21#top level cmake project for libbtbb lib + tools
22
23cmake_minimum_required(VERSION 2.8)
24project(libbtbb_all)
25set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)
26
27set(INSTALL_DEFAULT_BINDIR "bin" CACHE STRING "Appended to CMAKE_INSTALL_PREFIX")
28
29set(BUILD_SHARED_LIB ON CACHE BOOL "Build shared library")
30set(BUILD_STATIC_LIB OFF CACHE BOOL "Build static library")
31set(ENABLE_PYTHON ON CACHE BOOL "Build python tools")
32
33# Comment the following out for releases.
34set(CMAKE_C_FLAGS "$ENV{CFLAGS}" CACHE STRING "C Flags")
35
36add_subdirectory(lib)
37if(ENABLE_PYTHON)
38	add_subdirectory(python)
39endif()
40
41# Create uninstall target
42configure_file(
43    ${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
44    ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
45@ONLY)
46
47add_custom_target(uninstall
48    ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
49)
50