-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (37 loc) · 1.55 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
# Set up the base requirements
CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
PROJECT (pebble)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wmacro-redefined")
SET_PROPERTY(DIRECTORY . APPEND PROPERTY COMPILE_DEFINITIONS DEBUG=1)
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
ENABLE_TESTING()
# Boost package
FIND_PACKAGE(Boost REQUIRED)
# Find the Pebble SDK's includes
SET(PEBBLE_FLAVOUR basalt)
EXECUTE_PROCESS(COMMAND pebble sdk include-path ${PEBBLE_FLAVOUR} OUTPUT_VARIABLE PEBBLE_INCLUDE_DIR)
IF(NOT "${PEBBLE_INCLUDE_DIR}")
SET(PEBBLE_INCLUDE_DIR, "/Users/janmachacek/Library/Application Support/Pebble SDK/SDKs/3.10.1/sdk-core/pebble/${PEBBLE_FLAVOUR}/include")
ENDIF()
# Set the various parameters
SET(GTEST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.7.0")
SET(PEBBLE_MOCK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/pebble-mock")
SET(GTEST_INCLUDE_DIR "${GTEST_ROOT}/include")
SET(PEBBLE_MOCK_INCLUDE_DIR "${PEBBLE_MOCK_ROOT}/include")
# Set include directories
INCLUDE_DIRECTORIES("${PEBBLE_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/build/aplite)
INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${PEBBLE_MOCK_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
# Add the gtest
ADD_SUBDIRECTORY(${GTEST_ROOT} "${CMAKE_CURRENT_BINARY_DIR}/gtest")
ADD_SUBDIRECTORY(${PEBBLE_MOCK_ROOT} "${CMAKE_CURRENT_BINARY_DIR}/pebble-mock")
ADD_SUBDIRECTORY(core)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test)
ADD_TEST(
NAME pebble-ui-test
COMMAND pebble-ui-test
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test"
)