forked from tjunier/newick_utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (38 loc) · 1.17 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8)
project(NUTILS C)
if (NOT DEFINED BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON)
endif(NOT DEFINED BUILD_SHARED_LIBS)
set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
# this doesn't seem to work...
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(BUILD_SHARED_LIBS OFF)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
enable_testing()
# Packaging
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Shell tools for processing phylogenies")
set(CPACK_PACKAGE_FILE_NAME "Newick_Utils-1.6")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Thomas Junier")
set(CPACK_DEBIAN_VERSION_MAJOR 1)
set(CPACK_DEBIAN_VERSION_MINOR 6)
set(CPACK_GENERATOR "TGZ;TBZ2;DEB;RPM")
include(CPack)
option(USE_LIBXML "Use libXML" ON)
option(USE_LUA "Use Lua" ON)
find_package(BISON)
find_package(FLEX)
if(USE_LIBXML)
find_package(LibXml2)
endif(USE_LIBXML)
if(USE_LUA)
find_package(Lua51)
endif(USE_LUA)
configure_file (
"${PROJECT_SOURCE_DIR}/CMakeConfig.h.in"
"${PROJECT_BINARY_DIR}/config.h"
)
# this must go _before_ any add_subdirectory that needs it...
# TODO actually this may no longer be needed
include_directories(${PROJECT_BINARY_DIR} /usr/include/libxml2)
add_subdirectory(src)
add_subdirectory(tests)