forked from travisdesell/tao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (53 loc) · 2.42 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
68
cmake_minimum_required (VERSION 2.6)
project (TAO)
# The version number.
set (TAO_VERSION_MAJOR 1)
set (TAO_VERSION_MINOR 0)
set(CMAKE_CXX_FLAGS "-g -Wall -O3 -funroll-loops -msse3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib)
include_directories(${PROJECT_SOURCE_DIR})
#message("project source dir = ${PROJECT_SOURCE_DIR}")
#This will look for the undvc_common library, which should be in the
#same directory as TAO. It should be compiled in the ../undvc_common/build
#directory
FIND_PATH(UNDVC_COMMON_INCLUDE_DIR file_io.hxx
../undvc_common #add addiitonal paths here if undvc_common is in a different directory
)
MESSAGE(STATUS "UNDVC_COMMON include directory: ${UNDVC_COMMON_INCLUDE_DIR}")
FIND_LIBRARY(UNDVC_COMMON_LIBRARY
NAMES undvc_common
PATHS ../undvc_common/build #add additional paths here if undvc_common is in a different directory
#or if it has been build in a different directory
PATH_SUFFIXES lib
)
MESSAGE(STATUS "UNDVC_COMMON library: ${UNDVC_COMMON_LIBRARY}")
include_directories(${UNDVC_COMMON_INCLUDE_DIR})
#UNDVC_COMMON has the FindOpenCV.cmake, FindBOINC.cmake and FindMYSQL.cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${UNDVC_COMMON_INCLUDE_DIR}/cmake/Modules/")
set(RAPIDJSON_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/../rapidjson/include)
MESSAGE(STATUS "RAPIDJSON include directory: ${RAPIDJSON_INCLUDE_DIR}")
find_package(Boost REQUIRED COMPONENTS system)
#find_package(OpenCV COMPONENTS features2d nonfree flann imgproc highgui core)
find_package(BOINC)
find_package(MySQL)
find_package(OpenCL)
message(STATUS "opencl libraries: ${OPENCL_LIBRARIES}")
message(STATUS "opencl include_dirs: ${OPENCL_INCLUDE_DIRS}")
#add_subdirectory(neural_networks)
add_subdirectory(asynchronous_algorithms)
add_subdirectory(synchronous_algorithms)
add_subdirectory(util)
add_subdirectory(examples)
#add_subdirectory(mpi)
link_directories(${Boost_LIBRARY_DIRS})
if (BOINC_SERVER_FOUND AND MYSQL_FOUND)
add_subdirectory(boinc)
else (BOINC_SERVER_FOUND AND MYSQL_FOUND)
if (BOINC_SERVER_FOUND)
message(WARNING "MYSQL libraries missing, not compiling boinc subdirectory.")
endif (BOINC_SERVER_FOUND)
if (MYSQL_FOUND)
message(WARNING "BOINC libraries missing, not compiling boinc subdirectory.")
endif (MYSQL_FOUND)
endif (BOINC_SERVER_FOUND AND MYSQL_FOUND)