forked from fandywang/mltk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (27 loc) · 977 Bytes
/
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
cmake_minimum_required(VERSION 2.8)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
PROJECT(MLTK)
INCLUDE_DIRECTORIES(${MLTK_SOURCE_DIR})
MESSAGE(STATUS "The BINARY dir is " ${MLTK_BINARY_DIR})
MESSAGE(STATUS "The SOURCE dir is " ${MLTK_SOURCE_DIR})
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(mltk)
# Options
OPTION(test "Build all tests." OFF) # makes boolean 'test' available
IF (test)
MESSAGE(STATUS GTEST_ROOT=$ENV{GTEST_ROOT})
ENABLE_TESTING()
FIND_PACKAGE(Threads)
INCLUDE_DIRECTORIES($ENV{GTEST_ROOT}/include)
LINK_DIRECTORIES($ENV{GTEST_ROOT}/lib)
ENDIF()
# you should "export GTEST_ROOT GFLAGS_ROOT GLOG_ROOT" first
MESSAGE(STATUS GFLAGS_ROOT=$ENV{GFLAGS_ROOT})
MESSAGE(STATUS GLOG_ROOT=$ENV{GLOG_ROOT})
INCLUDE_DIRECTORIES($ENV{GFLAGS_ROOT}/include)
LINK_DIRECTORIES($ENV{GFLAGS_ROOT}/lib)
INCLUDE_DIRECTORIES($ENV{GLOG_ROOT}/include)
LINK_DIRECTORIES($ENV{GTLOG_ROOT}/lib)
SET(CMAKE_C_COMPILIER g++)