forked from jhu-cisst/mechatronics-software
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·66 lines (53 loc) · 2.02 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
#
# (C) Copyright 2011-2015 Johns Hopkins University (JHU), All Rights Reserved.
#
# --- begin cisst license - do not edit ---
#
# This software is provided "as is" under an open source license, with
# no warranty. The complete license can be found in license.txt and
# http://www.cisst.org/cisst/license.txt.
#
# --- end cisst license ---
project (Mechatronics)
cmake_minimum_required (VERSION 2.6)
# Set the version number
set (Amp1394_VERSION_MAJOR "1")
set (Amp1394_VERSION_MINOR "2")
set (Amp1394_VERSION_PATCH "0")
set (Amp1394_VERSION "${Amp1394_VERSION_MAJOR}.${Amp1394_VERSION_MINOR}.${Amp1394_VERSION_PATCH}")
# Add some warnings
include (CheckCXXCompilerFlag)
check_cxx_compiler_flag ("-Wextra" CXX_SUPPORTS_WEXTRA)
if (CXX_SUPPORTS_WEXTRA)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
endif (CXX_SUPPORTS_WEXTRA)
check_cxx_compiler_flag ("-Wall" CXX_SUPPORTS_WALL)
if (CXX_SUPPORTS_WALL)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif (CXX_SUPPORTS_WALL)
# ... for the build tree
set (CONF_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib" "${CMAKE_CURRENT_BINARY_DIR}")
set (CONF_LIBRARY_DIR "${PROJECT_BINARY_DIR}/lib")
configure_file (Amp1394Config.cmake.in
"${PROJECT_BINARY_DIR}/Amp1394Config.cmake" @ONLY)
# revision file
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/lib/AmpIORevision.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/Amp1394/AmpIORevision.h")
# To find Amp1394 library headers
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/lib
${CMAKE_CURRENT_BINARY_DIR})
# To link with build libraries
link_directories (${CMAKE_CURRENT_BINARY_DIR})
# Utilities to test libraw1394
add_subdirectory (util)
# Code for library Amp1394
add_subdirectory (lib)
# Test program using curse for text based display
find_package (Curses)
if (CURSES_FOUND)
add_subdirectory(tests)
else (CURSES_FOUND)
message ("Can't compile curses based test programs for Amp1394, make sure you have libcurses dev installed")
endif (CURSES_FOUND)
# Utility to flash/test board
add_subdirectory (programmer)