/
CMakeLists.txt
74 lines (58 loc) · 2.68 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
69
70
71
72
73
74
cmake_minimum_required (VERSION 2.6)
project (WILDLIFE_AT_HOME)
# The version number.
set (WILDLIFE_AT_HOME_VERSION_MAJOR 1)
set (WILDLIFE_AT_HOME_VERSION_MINOR 0)
# These will make cmake use clang and clang++ instead of gcc and g++
#SET (CMAKE_C_COMPILER "/usr/bin/clang")
SET (CMAKE_C_FLAGS "-Wall -std=c99 -Wl,-Bstatic")
SET (CMAKE_C_FLAGS_DEBUG "-g")
SET (CMAKE_C_FLAGS_MINSIZEREL "-Os -DNDEBUG")
SET (CMAKE_C_FLAGS_RELEASE "-O4 -DNDEBUG")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g")
#looks like on OSX the c++ clang compiler is also clang, not clang++
#SET (CMAKE_CXX_COMPILER "/usr/bin/clang")
#SET (CMAKE_CXX_COMPILER "/opt/local/bin/clang++-mp-3.1")
#SET (CMAKE_CXX_FLAGS "-Wall -static")
#SET (CMAKE_CXX_FLAGS "-Wall -Wl,-Bstatic -lopencv ")
SET (CMAKE_CXX_FLAGS "-Wall")
SET (CMAKE_CXX_FLAGS_DEBUG "-g")
SET (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
SET (CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
#SET (CMAKE_AR "/usr/bin/llvm-ar")
#SET (CMAKE_LINKER "/usr/bin/llvm-ld")
#SET (CMAKE_NM "/usr/bin/llvm-nm")
#SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump")
#SET (CMAKE_RANLIB "/usr/bin/llvm-ranlib")
#set(PLATFORM 64)
unset(Boost_INCLUDE_DIR CACHE)
unset(Boost_LIBRARY_DIRS CACHE)
#This may need to be updated or Linux/Windows
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /opt/local/lib)
include_directories (${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 FindBOINC.cmake and FindMYSQL.cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${UNDVC_COMMON_INCLUDE_DIR}/cmake/Modules/")
find_package(BOINC)
message(STATUS "BOINC SOURCE: $ENV{BOINC_SOURCE}")
add_definitions( -D_BOINC_ )
find_package(MySQL)
find_package(Boost REQUIRED COMPONENTS system)
link_directories(${Boost_LIBRARY_DIRS})
add_subdirectory(boinc_daemons)
#add_subdirectory(client)