-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
69 lines (57 loc) · 1.75 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# The Madeline-2.0 Project
#
# (c) 2006 by the Regents of the University of Michigan
#
# Released under the GNU GPL
#
PROJECT(MADELINE)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
#
# The Madeline2 version number:
#
SET(MADELINE_VERSION_MAJOR 2)
SET(MADELINE_VERSION_MINOR 0)
SET(MADELINE_VERSION "${MINIMADELINE_VERSION_MAJOR}.${MINIMADELINE_VERSION_MINOR}")
#
# Enable CTest
#
ENABLE_TESTING()
#
# Check if there exists a system-provided BZip2
#
INCLUDE(FindBZip2)
IF(BZIP2_FOUND)
INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
ADD_DEFINITIONS(${BZIP2_DEFINITIONS})
SET(requiredLibs ${requiredLibs} ${BZIP2_LIBRARIES})
ELSE(BZIP2_FOUND)
#Add bzip2 built from local copy to the requiredLibs
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/3rdParty/bzip2)
SET(requiredLibs ${requiredLibs} bzip2 )
ENDIF(BZIP2_FOUND)
#
# Recurse subdirectories:
#
ADD_SUBDIRECTORY(3rdParty)
ADD_SUBDIRECTORY(po)
ADD_SUBDIRECTORY(doxygen)
ADD_SUBDIRECTORY(src)
INCLUDE_DIRECTORIES(${MADELINE_SOURCE_DIR} ${MADELINE_BINARY_DIR})
INCLUDE(${CMAKE_ROOT}/Modules/FindDoxygen.cmake)
CONFIGURE_FILE(${MADELINE_SOURCE_DIR}/doxygen/Doxyfile.in ${MADELINE_BINARY_DIR}/doxygen/Doxyfile)
INCLUDE( FindDoxygen )
IF(DOXYGEN)
ADD_CUSTOM_TARGET(api-docs ALL ${DOXYGEN} ${MADELINE_BINARY_DIR}/doxygen/Doxyfile DEPENDS ${MADELINE_SOURCE_DIR}/doxygen/Doxyfile.in)
ELSE(DOXYGEN)
MESSAGE(STATUS "Unable to locate DOxygen : API Documentation will not be built!")
ENDIF(DOXYGEN)
#
# Put compiled libraries and executables in specified directories:
#
SET( LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/libs )
SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )