-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
44 lines (38 loc) · 1.51 KB
/
CMakeLists.txt
File metadata and controls
44 lines (38 loc) · 1.51 KB
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
cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
include(${CMAKE_SOURCE_DIR}/cmake_modules/standard_setup.cmake)
project(maidsafe_port)
if(ANDROID_BUILD)
ms_android_setup_flags()
message("===========================================")
message("Cross-compiling for Android Api Level - ${AndroidApiLevel}")
message("-------------------------------------------")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules)
include(port_utils)
if(NOT CMAKE_CONFIGURATION_TYPES)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type given. Setting and caching CMAKE_BUILD_TYPE to Debug.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Type of build; options are: Debug, Release, RelWithDebInfo, or MinSizeRel." FORCE)
else()
message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}")
endif()
endif()
set(SubModules common)
if(ANDROID_BUILD)
if(WIN32 OR APPLE)
message(FATAL_ERROR "Android builds are currently only supported in Linux.")
endif()
set(SubModules ${SubModules} android)
else()
set(SubModules ${SubModules} csharp nodejs python)
endif()
foreach(SubModule ${SubModules})
ms_underscores_to_camel_case(${SubModule} SubModuleName)
set(Msg "Configuring ${SubModuleName} Module for build")
string(REGEX REPLACE . "-" DashSeperator ${Msg})
string(REGEX REPLACE . "=" EqualsSeperator ${Msg})
message("${EqualsSeperator}\n${Msg}\n${DashSeperator}")
add_subdirectory(src/${SubModule})
set(${SubModule}_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/${SubModule})
endforeach()
message("${EqualsSeperator}")